handle client disconnect

cleanup
better logging