Yes, this is possible. FM Server has a command line interface that can list the currently connected users. That can be used to return the info you're looking for and should be faster than the console.
If you want to get a listing of that into a hosted FM file, one idea could be to use the Base Elements plugin and install it on the server, and use it in a script that executes a script and run it as Perform Script On Server to have it run and return the info needed.
Would that work?
If you have scripted the creation of accounts via a Staff table and stored usernames, you could match each user who connects to the file with their staff ID stored in the database and flag their staff record as "connected". You can un-flag them when they disconnect (onLastWindowClose).
Thus running a simple find on the staff table would give you the answer.
That's how I would do it