Fixed bug in credential transmission
Catching connect errors in connect callback