"Logging out" is a webmail idea, and not something normally associated with a desktop client like Mail. If you need to manage different users on the same machine, they should use their own account on the machine, where their email will be separate from any other users.
Alternatively, you can opt to not save your email password, so that you will be prompted to enter your password each time you launch Mail. When you quit Mail, you are effectively "logged out".
You can also take accounts offline individually from Preferences > Accounts, or all of the accounts at once by right clicking on your Inbox.