use scope guard in Client#run and add Client#connected