Implement user authentication.