title: Meteor.loginWithToken() on Server
body: <p>On the <strong>server</strong> I have the following code:</p>
  
  <pre><code>var userId = Accounts.createUser({"email": email});
  var stampedLoginToken = Accounts._generateStampedLoginToken();
  Accounts._insertLoginToken(userId, stampedLoginToken);
  </code></pre>
  
  <p>Calling <code>Meteor.loginWithToken(stampedLoginToken)</code> doesn't work since <code>loginWithToken</code> only available on Client. My questions:</p>
  
  <p>1) Is it possible to use <code>loginWithToken</code> on server side?</p>
  
  <p>2) If I can't use <code>loginWithToken</code>, are there any other ways I can simulate a user login?</p>
  
  <p>Thanks.</p>
  
  <p>Note: I'm using a third-party iOS DDP client <a href="http://github.com/martijnwalraven/meteor-ios" rel="nofollow">github.com/martijnwalraven/meteor-ios</a></p>