Closing connections in client after logout