Two points I haven't see mentioned:
1. Don't just dip the chain in and out as soon as the wax melts. You need to get that wax as hot as possible, well above the boiling point of water, and cook the chain in there for a good long time, in order to cook off all the water and solvents remaining on the chain.
2. Don't just pull out the chain when the wax is still scalding hot. The wax will just drip right off the chain. You need to let the wax cool down until it starts to thicken.