AngularJS OAuth2.0 user-agent flow