There's nothing like this. And, if you make an extension for this, you'll need to disable the parser cache (or modify it to take into account the logged/unlogged state). Else, only the state of last purge will be shown. Content on sidebars is not stored on the article cache, so it's a better place to put this kind of content (as the username does).