title: Django - allauth - Prevent an unauthenticated user to view pages meant for authenticated users
body: <p>I am trying to use Django with allauth trying to create a login page.</p>
  
  <p>I am able to login and redirect the user to LOGIN_REDIRECT_URL (= "/users/{id}/mypage") page successfully. I have a separate view for /users/{id}/mypage called the UserHomePageView as defined in views.py:</p>
  
  <pre><code>from django.views.generic import TemplateView
  
  class UserHomePageView(TemplateView):
      template_name = "user_homepage.html"
  </code></pre>
  
  <p>I want a security measure to prevent anyone (basically non-loggedin-users) to navigating to "/users/{id}/mypage" (e.g /users/5/mypage). e.i If unauthenticated user tries to navigate to /users/5/mypage, he/she should get redirected to signin page/homepage.</p>
  
  <p>Basically, how do i present a unauthenticated user to view pages that are meant for authenticated users (I don't want to use template tags users.authenitcated, but wish to override the TemplateView) </p>