Fix sessions and multiple db fixes.