Added logging to the authentication.