In Django, we can get the time user last logged in by using Auth.User.last_login. That is only updated when the user logs in using his username/password. Supp
Auth.User.last_login
I would go for django-last-seen
Usage:
from last_seen.model import LastSeen seen = LastSeen.object.when(user=user)