Detection of when a user is logged in or not now works