In addition to @morphist’s excellent advice above, see here for a method of communicating logout/login changes across the app, including whereever this menu is hosted.