Since it is a standard logoff and shutdown try this. Head over to the Control Panel, Power (its name varies so fish for it) and look under the Advanced tab to see what the machine is to do when the power button is pressed. Change it to "do nothing." Same for the other switch if it's there.
I found this to uncover the issue of a flaky power button or the user tapping the machine's case with their foot!
I don't mean "turns off", I mean the user gets logged off and then the computer shuts down. Nothing seems to precipitate this, and it is happening on a few computers. These are all stock gateways.
Any clues/things to check? I have no idea where to start.