In most wikis, there's a warning message above the editor when trying to edit a page anonymously. The message has "login" and "create account" links as $1 and $2.
Those links, unlike the two similar links in the personal tools bar in the top right corner, don't have the returnToQuery parameter. Therefore, those links won't redirect the user to the editing context.
See EditPage.php:3149