Stop on connection failed

The main purpose of this PR is to hide Login and Password of db connection from stacktrace in log file if connection fails.