Hacking AngularJS to work with ArcGIS.com oAuth