added method isLogged
changed the sending disconnect message logic