Implement basic authentication.