Due to the various kinds of Virus Attacks the userinit.exe files gets corrupted or various Antivirus deletes/quarantine the file. And as the result of the same the computer logs off automatically as soon as you start the computer. This is the problem faced now a days by most of the user. So what you need to do is you need to copy the file “userinit.exe” file from some other sources to the “C:/windows/system32” folder. More often the back up of the same file lies in “C:/windows/system32/drivercache” folder. So you can boot up the system using some “Windows Live” or “Third party Boot CD” kind of utilities and copy the file from the DRIVERCACHE folder to SYSTEM32 Folder.
That might be the case that you may not find the file within the infected system then in that case you can copy the file from another working system to the destination folder that is “C:/windows/system32”. This is the solution that worked for me. So I hope it may also work for you. If did not work then you can always put up your comment to the blog so that I can even improve my blog providing other solution to the kind of typical problem.