Check logged state of user first