Added a logging message to the authentication method