Here's a handy command to list user login information in a columnar format. The command is named listusers. How appropriate. This formatted information can easily be used for scripting purposes.
#listusers
#listusers -l login
#listusers -g xlock
The other command that list user and system login information is named logins