I think that it would be clearer if we set the session variable at the end of the `getDashboardAndSearchMenus` function and delete this line...