added a check where we can check if a member is logged in or not