Fix custom user authentication handling for django 1.5
Fix regression introduced in previous commit
Update tests to support python 2.6 (as @kmike suggested)
one more fix for django 1.5 custom user models