If you leave it on the login screen does it restart then or is it literally only after you log in?
If it's only after you log in I'd guess it's a windows ME thing, possibly a process that's kicking off and causing a BSOD - that really was one of the worst operating systems ever to be burnt to a CD. Does the same thing happen in safe mode? And is the restart caused by a BSOD (turn off automatic restart on system failure to check) or is it a hard reboot that looks like it's been instigated by a hardware fault?
You could also try booting up with knoppix and run that for a while to check if the same thing happens.
Either way, I'd recommend getting rid of ME... I don't know anyone that still uses it!