You are right that this is an old thread (which probably should be left in peace). But I'll respond to point out that you've not answered the original question - which was about showing the logged-in status of other users.
For the current user, you should use isloggedin() (possibly combined with isguestuser(), to check they are a real user). It happens that isloggedin() just calls !empty($USER->id), so your method would probably work anyway (but possibly with a debugging warning, if the $USER object had no 'id' field defined).