For those who don’t want the available users to be publically visible to whoever wakes up or powers on your Mac, there is an easy way of hiding the list – or just select members. In a Terminal window run the following:
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add [username]
You can do this to multiple accounts at once;
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add [username01] [username02] [username03]
To find the username that OS X uses for each user account, do the following:
Go to System Preferences -> Users and Groups -> Click the lock to allow changes -> Right click on a username -> Advanced Options
Under the section:
…you will see the account name which OS X uses for that user account.