Add success and error callbacks to connect