from django.http import HttpResponse, HttpResponseRedirect from django.core.context_processors import csrf from django.shortcuts import render from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required