Raise an AuthenticationError when the authentication failed