Fixed a bug in how the client connects

The bug caused the client to clear its packetlist after receiving the
response to its join request, therefore not reacting to properly and
getting stuck in a limbo-esque connection state