Fixed a bug in the authentication system