Cleaned up code and added PDO functions
Sessions are stored in database

Brief:

bootstrap.php was refactored to load config first, inject
into dbManage static variable (rest to constants), then load
a session. This allows the custom session functions an active
database connection object. Before the database needed a config
which needed a session. It was circular not any more.

Some file now call session_write_close() explicitly to avoid the
PHP object destruction before session closure problem.

I'm sure other session issues will crop up. They will be squashed
as they're found.