Fixed exception when a client hasn't logged in yet and closes connection