This also encapsulates the HTTP Auth stuff better so that it will be easier to wrap it all into a event-based service.