Add basic authentication support.

I think `setAuthType` would be more explicit name...