Added oauth2 functions to register applications, finished writing the portals section of the AGOL/Portal REST API.