title: How to login using django & mongodb
body: <p>I have coding challenge must use technologies:<br>
   - Python/Django<br>
   - Backend : Django<br>
   - Frontend : Angular<br>
   - Database : MongoDB<br>
  I found some problems in login,
  in django how i can login using database mongodb </p>
  
  <p>views</p>
  
  <pre><code>def auth_login(request, on_success='/', on_fail='/account/login'):  
  user = authenticate(username=request.POST['email'], password=request.POST['password'])
  if user is not None:
      login(request, user)
      return redirect(on_success)
  else:
      return redirect(on_fail)
  </code></pre>
  
  <p>Error : <br>
  <b>settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.</b></p>