Separated menus from page contents; handled menus with specialized middleware. Implemented menu reload on logging in/out.