[Help] Random Error?

Hello there!

Last Night, I logged out of my computer and shut it off, but the fans did not shut off, so i turned the system back on to a wonderful message. PS. I am on WINDOWS 8!!!

Windows said that I could not log on because of error code 0xc000021a, which means that winlogon.exe or csrss.exe unexpectedly quit. I am 99% sure that I did not have a virus because I had an anti-virus running and the only websites I went on were youtube/other Google services. The only other internet I used was on Steam. 

The only thing I could do was re-install Windows. I lost all my programs, games, and work I had. Even all game saves and profiles.

As anyone would imagine, this is quite frustrating. I would like to know if there is any way to prevent this, if at all possible. Also, if this were to happen again, I would like to know how to make it so that not all my data is lost. I plan on using my computer as a work station, so I can not afford to keep losimg my data. 

Thank you for your time :-)