set authorization header using the auth option. small code improvements