Tidy up database helper
Persist session in mongoDB