Add handlers for response packets, fix misc. connection issues