Added authorize to OAuth, fixed bug when extending urls with query