Some refactoring

1. Move sessiondialog UI method into separate function
2. Point Mongo URI to a new database