code: function() {
          var user = userStore.getUser();
          if (user) {
            $rootScope.user = user;
            authLogger.log('AuthService.withUser()', user);
            return $q.when(user);
          } else {
            authLogger.log('AuthService.withUser(), calling startLogin()');
            return this.startLogin();
          }
        }
docs: Returns a promise of a user, which is resolved with a logged in user. Triggers a login if needed.