Surround auth realm in quotes
Refactor basic_auth to make sure content is added in correct place