Change authorization method in AngularJS