Angularjs auth

Replace ng-token auth with the AngularJS native $http command.
Possible to use ternary here?