make DB table and (some) fields configurable

I ran into a something where I had an existing session management running under php and wanted to re-use the existing database without having to change the legacy code.
This PR helps do that.