Add success and error callbacks to connect
Merge pull request #1 from jarias/connection_callbacks

Add success and error callbacks to connect