I encountered this problem that windows logs in and immidiately logs off. It was my first time to face such a problem and have never heard about it.
It was really frustrating (I wonder if someone here had faced it). I knew very well it had something to do with the login file wininit.exe. I search over the net for a solution after fruitlessly spending time calling everyone I knew could help.
I came across threads that directed me to replace the wininit file with the waupdate file from the recovery console. It did not work! I went to another site with a "proposed fix" which I had to pay before I view the solution.
I had no choice since formating the HD was not an option. Guess what....? It was the same solution I found before

...perhaps copied from the site.
A solution was found later but I was unhappy even till date that I paid for something that did not solve my problem.