Adds support for secureConnect callback and fixes test
travisplexer: pr-442-osx travis ci test