Implement basic auth.

Closes #87. Does anyone have an API example with digest auth?