Add ssl port, mongo port, mongo db and update for unittest
Connect to db