Replaced usage of the User object with django authentification backends
Inspired from code from django.contrib.auth.login/get_user