Possible causes that come to mind:
1. The PSU may be dying or has a bad connection.
2. Your PC may be overheating or may have hardware issues
3. Your System may be infected, particularly an infection related to the Winlogon. http://techproblems.org/winlogon-exe/
4. Your System may have corrupted or missing System Files.
5. It may have malicious processes running, or startup programs that may interfere with the logon process.
Possible fixes:
1. Check power connections and/or another PSU
2. Check the CPU fan is running at adequate speed, and heatsink isn't clogged. Install a temperature monitoring program.
3. Run Virus and Malware scanns and check the number of Startup programs and disable those you don't need starting with Windows. Start\Run\type msconfig\click on Startup tab\uncheck unnessential-cessary programs.
4. Insert the Windows XP CD in the CD reader and in Start\Run\type: SFC /SCANNOW
5. Instal CCleaner to: Clean your system from user and system temp files, temporary internet files, cookies, residual; log, settings, and system files, and also clean the Registry
http://www.piriform.com/ccleaner