Almost 100% coverage on the API core, refactored a bit, split NewClient() into NewClient() and Authenticate().