public User handleResult(APITatarResponse response) throws Exception {
JSONObject userData;
if(parseFromArray) {
JSONArray resp = new JSONArray(response.getData());
if(resp.length() == 0) {
throw new WrongCredentialsException();
}
userData = (JSONObject)resp.get(0);
} else {
userData = new JSONObject(response.getData());
}