Establish and stop connection