Implement logout method and update menu activePage variable