title: request.user.is_authenticated always returns false
body: <p>after logging in the user and checking whether request.user isauthenticated in other activity in android. the value is always false.</p>
  
  <p>the following code is used for login a user</p>
  
  <pre><code>from rest_framework.response import Response
  from rest_framework import status
  from rest_framework.decorators import api_view
  from django.contrib.auth.models import User
  from django.contrib.auth import authenticate,logout,login
  
  
  @api_view(['POST'])
  def userRegister(request):
      user=User.objects.create_user(username=request.POST['username'],email=request.POST['email'],password=request.POST['password'])
      return Response({'ok':'True'},status=status.HTTP_201_CREATED)
  
  @api_view(['POST'])
  def userLogin(request):
      user=authenticate(
          username=request.POST['username'],
          password=request.POST['password']
      )
      if user is not None:
          login(request,user)
          return Response({'ok':'True'},status=status.HTTP_200_OK)
      else:
          return Response({'ok':'False'},status=status.HTTP_401_UNAUTHORIZED)
  </code></pre>
  
  <p>the following code is used to check whether the user is authenticated or not </p>
  
  <pre><code>from rest_framework.response import Response
  from rest_framework.decorators import api_view
  from . import models
  from . import serializers
  from django.contrib.auth.models import User
  from rest_framework import status
  
  
  @api_view(['GET'])
  def HomeView(request):
      if request.user.is_authenticated:
          return Response(data={"ok":'true'})
      else:
          return Response(data={"ok":"false"})
  </code></pre>