Basic authentication infrastructure.