Coming out of T276561, the user links menu for both logged in/out users needs to sort the menu items so that the "Logout" or "Login" links appear last in the list.
As a logged-in user, when I access my user links, I should see the login/logout menu links last, even if gadgets are added to the menu.
Note that in the screenshot below, the UTC Clock gadget is appearing below the "Log out" link.
- The "Log in" and "Log out" links in the personal dropdown vector menu (when feature flag is enabled) appear last in the list.
- Gadgets that currently add to the personal tools appear below the "Log in" and above the "Log out" items - e.g. if I call mw.util.addPortletLink('p-personal', '#', 'My link', 'mmssss', 'hey there') I get "random gadget" in the menu after the "Log in" or before "Log out" items.