VIRUS - Log in, logs off HELP ME PLEASE

please help me

 

The following is exactly what has happened, and what i have done so far to my computer in an attempt to fix it:

1. I turn on my computer and log in as normal. The Background is shown for about 10 seconds, and then it logs off. I tried logging on again. It instantly logs me off, this time not even seeing the background. There are no other accounts on my computer, i did not log in elsewhere.

2. I went onto safe mode. This worked and the log in worked. I went straight to AVG and ran it to pick up any viruses. It did its special thing, as i was in safe mode, and it picked up some viruses ( mostly trojan horses). I assumed this was the end of the matter, and rebooted my computer. it did not work.

3. I went to go back onto safe mode and it did not work, logging me out straight away this time. I tried the administrator account, that did not work aswell.

4. I inserted the windows XP cd, and that worked. I got it to recovery mode and put in the line "copy C:\WINDOWS\servicepackfiles\i386\userinit.exe C:\WINDOWS\system32". This did not work.

5. I tried the last known good configuration. This did not work.

 

please help