Add support for HTTP basic authentication

I noticed this change by @willemstuursma and thought it would be a relevant addition to the main branch.

Any thoughts?