 <p>Look at the Pinax project's <a href="https://github.com/pinax/pinax/blob/master/pinax/apps/account/auth_backends.py" rel="nofollow">account auth_backends </a>, there it replaces with own one. I think Pinax code helps you while changing Django's authentication backend.</p>