Implemented authentication.