add test to check last_seen middleware