1. Open the Local Security Policy editor.
2. In the left pane, expand Local Policies, and click on Security Options. (see screenshot below)
3. In the right pane, double click on Interactive logon: Display user information when the session is locked. (see screenshot above)
4. Select the option you want, and click on OK. (see screenshot below)
5. Lock the computer (Windows Key + L) to see the change.
6. You may also wish to set the same setting for the Windows logon screen: How to Make Windows 7 Require a User Name and Password in Logon Screen