Handle the backwards compatibility, and cases with no permissions like the login page, correctly in the menu local