new functions for logged in users, last login