code: def anonymous_required(view, redirect_to=None):
      
      if redirect_to is None:
          redirect_to = settings.LOGIN_REDIRECT_URL
  
      @wraps(view)
      def wrapper(request, *a, **k):
          if request.user and request.user.is_authenticated():
              return HttpResponseRedirect(redirect_to)
          return view(request, *a, **k)
      return wrapper
docs: Only allow if user is NOT authenticated.