docs: def ajax_login(request):
      """
      Accept a POST request to login.
  
      :param request:
          `django.http.HttpRequest` object, containing mandatory parameters
          username and password required.
      """
      username = request.POST['username']
      password = request.POST['password']
      user = authenticate(username=username, password=password)
      if user is not None:
          if user.is_active:
              login(request, user)
              return HttpResponse(content='Successful login',
                                  content_type='text/plain', status=200)
          else:
              return HttpResponse(content='Disabled account',
                                  content_type='text/plain', status=403)
      else:
          return HttpResponse(content='Invalid login',
                              content_type='text/plain', status=403)