Save the session to a mongo database.