title: Log in to a meteor app from a Google chrome extension
body: <p>I have a meteor app that uses restop2 package to allow posting data.</p>
  
  <p>The restop2 package provides a way to log in by sending user / password to a specific URL :</p>
  
  <pre><code>curl --data "password=PASSWORD&amp;user=USERNAME" http://localhost:3000/api/login/
  </code></pre>
  
  <p>It returns a JSON response containing a user ID and an access token :</p>
  
  <pre><code>{"loginToken":"TOKEN","userId":"USERID","success":true}
  </code></pre>
  
  <p>I can then post to the api by sending the user ID and the access token in the header :</p>
  
  <pre><code>curl -X POST -H "X-Login-Token: TOKEN" -H "X-User-Id: USERID" -H "Content-Type: application/json" -d '{"title":"My title","content":"My content"}' http://localhost:3000/api/clip/add
  </code></pre>
  
  <p>So far, so good.</p>
  
  <p>Now I'd like to log into my app from a Google extension. How can I do this ? Should I simply implement a login form in the extension's popup, post the data to my web site over HTTPS and use the returned token in subsequent requests ? And where should I store this token ?</p>