app.service('AuthService', ['Users', '$window', function (Users, $window) {
var self = this;
self.updateCurrent = function () {
self.user = Users.current();
return self.user
};
self.updateCurrent();
self.currentUser = function () {
return self.user;
};
self.signOut = function (){
$window.location = '/accounts/logout/';
};
}]);