Mac: If you’re worried that someone might be snooping around on your Mac, USB Screen Lock is an app that adds a kind of two-factor authentication by requiring you to insert a USB drive to unlock the computer.
With USB Drive running, all you need to do is stick in a USB drive and set it up. You can add another password on top of that too. When you remove the drive, the screen locks and can’t be unlocked until you re-insert the USB drive.
While the person trying to get into your computer could always reboot it, this at least provides a first line of defence for anyone snooping in on you when you run to the bathroom.