Maybe try putting some logging in your CustomUserModelBackend.
Near the top, put in some logging boilerplate:
import logging
logger = logging.getLogger(__name__)
Then in your backend, something like this:
class CustomUserModelBackend(ModelBackend):
...
logger.info('User.id={}: User not found, attaching AnonymousUser'.format(user_id))
return None
This backend method is checked by the AuthenticationMiddleware when it attaches the user to the request
When you make a backend like this it is also a good idea to make a test suite for it.
If these are all fruitless, maybe try looking at your session setup. I'm assuming you are running the db backend for the sessions. If you are using memcached or something else, check the usual settings (TIMEOUT, OPTIONS, etc)
K