Added gettoken function, http, json parsing