Windows users can enable password protection on wakeup from sleep. This is useful when you are away from the computer and do not want any one to access your data without entering the correct password to unlock the computer.
Enable password protection on wakeup in Windows 8.1
Windows 8.1 users can turn on or off the password protection on wakeup using the option available as part of PC Settings. Access PC Settings using Windows 8 charms bar.
In the PC Settings screen, click Sign-in options and navigate to Password policy section.
Then click the Change button to turn on the password protection on wakeup.
Enable password protection on wakeup in Windows 7
In Windows 7, password protection can be enabled when a computer wakes up from sleep. To define password protection, navigate to Control Panel -> Hardware Sound -> Require a password when the computer wakes under Power options
Under Power button settings select Sleep in the When I press the power button drop down and require a password radio option.