Fix isLoggedIn(), which is incorrectly returning null