added listener for client disconnect