Basic auth

A common use case for API tokens is authenticating via [HTTP Basic Authentication](http://en.wikipedia.org/wiki/Basic_access_authentication). This branch adds support for Basic Auth while retaining support for passing credentials via request parameters.