Have you considered to use the built-in login_required decorator in ```django.contrib.auth``` (see https://docs.djangoproject.com/en/1.3/topics/auth/#the-login-required-decorator )?

I am fine with your implementation as I don't like django.contrib.auth (and this is changed a lot in 1.4 and 1.5). However, it allows a better integration with other django app (which honors the protocols of django.contrib.auth).

thus, please just add a comment explaining why you have not used it.