Move redirect_to_login in util.py.
Replace HttpResponseRedirect by redirect shortcut.
Use module imports in urls.py.