Authorize service almost implemented. still have bugs with JSON-parsing