patched to support custom user models (1.5) and deprecation of django.conf.urls.defaults (1.6)