Implement authentication.