title: Django LoginRequiredMixin not working as intented
body: <p>The LoginRequiredMixin is not working as intended for the class based view below, I was able to access the webpage regardless of login status, but it should have redirected the unauthorized users to the login page. Where have I gone wrong?</p>
  <pre><code>from django.shortcuts import render, redirect
  from django.contrib.auth.mixins import LoginRequiredMixin
  from django.views.generic import FormView
  from .forms import UpdatePortfolio
  # Create your views here.
  
  class UpdatePortfolioView(LoginRequiredMixin, FormView):
      login_url = 'users:login'
      redirect_field_name = 'mainpage:update'
      form = UpdatePortfolio
      template_name = 'mainpage/updateportfolio.html'
  
      def get_object(self):
          # return self.request.user.id
          return self.request.user.pk
  
      def get(self, request, *args, **kwargs):
          form = self.form_class
          return render(request, self.template_name, {'form': form})
  </code></pre>