title: How to custom save login information in django
body: <p>I am creating an app where I am dealing with an external REST API, I am sending my login credentials along with JWT token if they are correct I get a success status along with phone number and id, Now I dont know how to save this data to set persmissions to disaplay pages, like in normal app we sigply use login(request, user) to save the user but here we dont have database. Now I want to show some of the pages if the user is authenticated.I tried using</p>
  <pre><code>reuqest.session['user_id]
  </code></pre>
  <p>but deleting the session when user clicks on logout  but this does't seems to be a good idea.</p>