Updated this to work with Django 1.5 custom auth models