added custom directive for req field
added basic authentication