Added support for foreign characters in POST response.

The `login` method fails to set the auth token and username if the `POST /login` request contains foreign characters (in my case, the last name of a Snapchat friend was Elfström), because `json_decode` then gives the following error:

    JSON_ERROR_UTF8	    Malformed UTF-8 characters, possibly incorrectly encoded 

The attached code fixes the issue by correctly encoding it as UTF-8, as per [this Stackoverflow response](http://stackoverflow.com/a/17182431/1389887).