AngularJS Nereid Authentication Service