Properly handle disconnections during login phase.

Signed-off-by: Guillaume Clement <gclement@baobob.org>