docs: function () {
      var self = this;
      var user = Meteor.users.findOne(self.userId, {
        fields: {
          "services.resume.loginTokens": true
        }
      });
      if (user) {
        // Save the current tokens in the database to be deleted in
        // CONNECTION_CLOSE_DELAY_MS ms. This gives other connections in the
        // caller's browser time to find the fresh token in localStorage. We save
        // the tokens in the database in case we crash before actually deleting
        // them.
        var tokens = user.services.resume.loginTokens;
        var newToken = Accounts._generateStampedLoginToken();
        var userId = self.userId;
        Meteor.users.update(userId, {
          $set: {
            "services.resume.loginTokensToDelete": tokens,
            "services.resume.haveLoginTokensToDelete": true
          },
          $push: { "services.resume.loginTokens": Accounts._hashStampedToken(newToken) }
        });
        Meteor.setTimeout(function () {
          // The observe on Meteor.users will take care of closing the connections
          // associated with `tokens`.
          deleteSavedTokens(userId, tokens);
        }, Accounts._noConnectionCloseDelayForTest ? 0 :
                          CONNECTION_CLOSE_DELAY_MS);
        // We do not set the login token on this connection, but instead the
        // observe closes the connection and the client will reconnect with the
        // new token.
        return {
          token: newToken.token,
          tokenExpires: Accounts._tokenExpiration(newToken.when)
        };
      } else {
        throw new Meteor.Error("You are not logged in.");
      }
    }