When attempting to restart or shut down your computer (while multiple users are logged in using Fast User Switching), you will receive this alert, which is normal: "There are currently logged in users who may lose unsaved changes if you restart this computer." To proceed, you must enter a name and password belonging to an administrator account. However, if you enter a valid administrator user's name and password, then click on the Restart or Shut Down button, you may unexpectedly receive this message: "Invalid user name or password. Please try again."
More from Apple OS X Support ...