Try to log in first, then join.

Hacks include sleeping before joining and not just waiting for a proper response.