title: How to login users with email and log them out with Django Rest Framework JSON web tokens?
body: <p>I have an existing, working Django application that implements numerous Django-REST-framework APIs.
  I've just added user authentication with <a href="https://github.com/GetBlimp/django-rest-framework-jwt" rel="nofollow"><strong>Django-rest-framework-JWT</strong></a> and now I'm trying to learn it up. I have verified that it does issue me a token if I do the following curl:</p>
  
  <pre><code>curl -X POST -d "username=myuser&amp;password=mypassword" http://localhost:3050/api-token-auth/
  </code></pre>
  
  <p>But I have a series of questions that I don't see being addressed in the documents. Please answer the following questions:</p>
  
  <ol>
  <li>How do I invalidate the token using curl? I need to do so when the user logs out.</li>
  <li>Where are these tokens stored in the DB? After implementing <code>django-rest-framework-jwt</code>, I don't see any new tables in my Django Admin interface</li>
  <li>I would like to allow my users to login with their usernames <strong>or</strong> their emails. So I would like to wrap the <code>api-token-auth</code> endpoint in a custom endpoint that checks if the given string is an email or username. If email, I will lookup the username. Then call the api-token-auth. How should that endpoint look? I don't know how to wrap this <code>api-token-auth method</code>.</li>
  </ol>