Implemented add_auth, including support for realms