Implemented user authentication.