Added improved HTTP authentication support

Adds ability to specify a username and password as per request #28 and
addresses the API bypassing not working under a non blank web root.