Do you get an error message? Does the PC restart or does Windows log you back out?
Usually a PC crash right after Windows loads leads back to an issue with the hard drive.
If Windows just logs you out, there is a registry fix for that. The issue there is that the Windows logon service is replaced by either some remote control software or by a virus. You can fix it it by making sure the userinit key is set to this: Userinit=C:\WINDOWS\system32\userinit.exe