Try accepted solution.
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_24543911.htmlYou may also have a virus on machine causing log off issue.
If so check this key using boot cd like Ubcd4Win
Boot to Ubcd4win and run its regedit app
http://www.ubcd4win.com/Browse to this key:
HKEY_LOCAL_MACHINE\SOFTWAR
E\Microsof
t\Windows NT\CurrentVersion\Winlogon
Value Name> userinit
Value Data of userinit should be all of the following:
C:\WINDOWS\system32\userin
it.exe,