Revamped client connection handling