fix issue#1: add isLoggedIn flag