add proper disconnect for client