I found the reason my Windows 7 machine was doing this. The NTUSER.DAT file was corrupted which probably explains why the login process takes so long since this contains user profile info.
I ran the Windows utility to scan and fix the disk and it fixed it. That's also why I know what file was...