http://thinkinginpixels.com/quick-fixes/fix-windows-xp-log-onlog-off-loop/
The short version is you download a Vista boot cd and his SaveMe cd. Boot on the Vista cd, go to the command prompt and type in saveme. You must know your SP number!!! SaveMe will ask for the SP number, then copy over the correct system files. It'll also run spybot, which usually takes many hours to run so I always cancel it. If you haven't cleaned the system and you have the time I would let it run.
I have created a single .iso file with the Vista boot and save me files on one disc. You can download it here, http://www.techruckus.com/forum/download/saveme.iso
If you have a Windows cd with the correct service pack on it you can replace the files manually. I had to do this the other day when I forgot my SaveMe cd at the office. You can find all of the files in the i386 folder on the cd, then use the expand command to uncompress them. 7z will also work. I used Mini XP in Hiren's Boot CD 10.0 to extract and replace the files. Here's a list of the files that need replaced:
Cmd.exe
Explorer.exe
Logoff.exe
Logonui.exe
Lsass.exe
Mmc.exe
Msconfig.exe
Regedit.exe
Rundll32.exe
Services.exe
Svchost.exe
Userinit.exe
Winlogon.exe
