@method_decorator(sensitive_post_parameters())
@method_decorator(csrf_protect)
@method_decorator(never_cache)
def dispatch(self, request, *args, **kwargs):
    if (not request.user.is_anonymous):
        return HttpResponseRedirect('/')
    response = super().dispatch(request, *args, **kwargs)
    login_user(request=request, response=response, user=request.user, login=False)
    return response
@method_decorator(sensitive_post_parameters())
@method_decorator(csrf_protect)
@method_decorator(never_cache)
def dispatch(self, request, *args, **kwargs):
    if (not request.user.is_anonymous):
        return HttpResponseRedirect('/')
    response = super().dispatch(request, *args, **kwargs)
    login_user(request=request, response=response, user=request.user, login=False)
    return response