Fixed README example

The current example provided in the README does not actually work. Moving connect to the end of the example mimics the code provided in the examples and will protect new users from undo frustration.