I could not find an adequate solution to this problem anywhere on the net. People attributed it to DNS, but that was not the cause here. In my case, I found the problem and wanted to share the solution with others and see if it solves their issues as well:
Laptop with XP Pro, SP2, completely patched, hangs when user thries to log in when connected to the domain or stand-alone. This behavior occurs when the wireless card is turned on or off. The system hangs at "applying network settings." DNS is configured without any problems. This only effects 3 laptops on the entire network.
In your wireless settings, check your list of "preferred networks." Every time you connect to a hotspot, windows adds it to this list. In my case, the affected laptops belonged to employees who travelled A LOT and had 50-60 "preferred networks" listed from airport hotspots to hotel networks. I removed all of them except the ones used for the office and his home network, and it completely fixed the issue.
I am not sure of the technical reasoning behind it, but my guess would be that Windows checks each of these connections at some point during the boot-up (perhaps during the "applying network connections" stage) to poll them for availability. 3-4 preferred networks doesn't take long, but processing 50-60 of them causes the system to take a lot more time to do this.
If there is anyone else who is having similar problems, try this and see if it works. I am interested to see if it helps other people as well.