use getattr with settings.AUTH_USER_MODEL to be compatible with django < 1.5