Fix array response, fix hostname

Two minor fixes:

* apparently, when is user yet not authorized the response is an Array. In this case extract the first element
* `.hostname` is not available for ruby < 2. There it's called `.host`

Sorry no test as no test framework exists :)

fixes #2