Achieving oAuth auothorization with Angularjs