changed connection logic. The SS_database object will only be created once.