@classmethod
def associate_user_with_session(cls, request, user):
    """This method can be overwritten to implement custom user/session mechanizms
        currently it uses standard django.contrib.auth"""
    from django.contrib.auth import login as auth_login
    if not user or not user.is_authenticated():
        return
    if not hasattr(user, 'backend'):
        setattr(user, 'backend', 'django_mojeid.auth.OpenIDBackend')
    auth_login(request, user)
