Implemented authenticationFailed.