Things that happen "sometimes" are difficult to diagnose as they are often related to hardware issues.

I'd start with making a new account (if XP loads succesfully) and login to that. Might just be better. If not, it's time for a clean install (back to factory conditions) of Windows from your XP or recovery CD.

Kees