Added rejoin

Commented some stuff.
Added auto rejoin on connection lost.