Implement connect command