Add state.newDB method and use it for session sharing