This is a screen saver setting hidden the in the old Control Panel from previous versions of Windows. To get to the setting follow the steps bellow:
1. Open the start menu up and search for "Control Panel"
2. Go to "Appearance and Personalization"
3. Click on "Change screen saver" underneath Personalization on the right
4. Under Screen saver there is an option to wait for "x" minutes to show the log off screen (See below)
If you uncheck the checkbox you should be able to prevent your computer logging off.