A small problem I had, with a quick fix. I would put the computer to sleep. It would write everything to the hard drive and get to the point where it was about to shut down, and the screen (along with everything else) would immediately come back up and ask me to log in. The fix…?
In device manager, go to the properties of both your keyboard and mouse. Uncheck “Allow this device to wake the computer”. No guarantee that it will work for you, but it worked for me.