Added change to allow for secureConnect events rather than just connect events (for SSL support).