An example implementation of OAuth on the client side with angular.