more refactoring, removal of loggedout scope attribute