Implement basic auth.