Rewritten client

* Now uses promises
* Automatic response unwrapping
* Added support for Basic HTTP Authentication