function getLoggedInPages($rexUser)
 {
     global $I18N;
     $pages = array();
     $profile = new rex_be_page($I18N->msg('profile'));
     $profile->setIsCorePage(true);
     $pages['profile'] = $profile;
     $credits = new rex_be_page($I18N->msg('credits'));
     $credits->setIsCorePage(true);
     $pages['credits'] = $credits;
     $structure = new rex_be_page($I18N->msg('structure'), array('page' => 'structure'));
     $structure->setIsCorePage(true);
     $structure->setRequiredPermissions('hasStructurePerm');
     $pages['structure'] = new rex_be_main_page('system', $structure);
     $mpool = new rex_be_popup_page($I18N->msg('mediapool'), 'openMediaPool(); return false;');
     $mpool->setIsCorePage(true);
     $mpool->setRequiredPermissions('hasMediaPerm');
     $pages['mediapool'] = new rex_be_main_page('system', $mpool);
     $linkmap = new rex_be_popup_page($I18N->msg('linkmap'));
     $linkmap->setIsCorePage(true);
     $linkmap->setRequiredPermissions('hasStructurePerm');
     $pages['linkmap'] = $linkmap;
     $content = new rex_be_page($I18N->msg('content'));
     $content->setIsCorePage(true);
     $content->setRequiredPermissions('hasStructurePerm');
     $pages['content'] = $content;
     $template = new rex_be_page($I18N->msg('template'), array('page' => 'template'));
     $template->setIsCorePage(true);
     $template->setRequiredPermissions('isAdmin');
     $pages['template'] = new rex_be_main_page('system', $template);
     $modules = new rex_be_page($I18N->msg('modules'), array('page' => 'module', 'subpage' => ''));
     $modules->setIsCorePage(true);
     $modules->setRequiredPermissions('isAdmin');
     $modules->setHref('index.php?page=module&subpage=');
     $actions = new rex_be_page($I18N->msg('actions'), array('page' => 'module', 'subpage' => 'actions'));
     $actions->setIsCorePage(true);
     $actions->setRequiredPermissions('isAdmin');
     $actions->setHref('index.php?page=module&subpage=actions');
     $mainModules = new rex_be_page($I18N->msg('modules'), array('page' => 'module'));
     $mainModules->setIsCorePage(true);
     $mainModules->setRequiredPermissions('isAdmin');
     $mainModules->addSubPage($modules);
     $mainModules->addSubPage($actions);
     $pages['module'] = new rex_be_main_page('system', $mainModules);
     $user = new rex_be_page($I18N->msg('user'), array('page' => 'user'));
     $user->setIsCorePage(true);
     $user->setRequiredPermissions('isAdmin');
     $pages['user'] = new rex_be_main_page('system', $user);
     $addon = new rex_be_page($I18N->msg('addon'), array('page' => 'addon'));
     $addon->setIsCorePage(true);
     $addon->setRequiredPermissions('isAdmin');
     $pages['addon'] = new rex_be_main_page('system', $addon);
     $settings = new rex_be_page($I18N->msg('main_preferences'), array('page' => 'specials', 'subpage' => ''));
     $settings->setIsCorePage(true);
     $settings->setRequiredPermissions('isAdmin');
     $settings->setHref('index.php?page=specials&subpage=');
     $languages = new rex_be_page($I18N->msg('languages'), array('page' => 'specials', 'subpage' => 'lang'));
     $languages->setIsCorePage(true);
     $languages->setRequiredPermissions('isAdmin');
     $languages->setHref('index.php?page=specials&subpage=lang');
     $mainSpecials = new rex_be_page($I18N->msg('specials'), array('page' => 'specials'));
     $mainSpecials->setIsCorePage(true);
     $mainSpecials->setRequiredPermissions('isAdmin');
     $mainSpecials->addSubPage($settings);
     $mainSpecials->addSubPage($languages);
     $pages['specials'] = new rex_be_main_page('system', $mainSpecials);
     return $pages;
 }