add a table for session storage
change flash messages to use the DB as storage
use a separate DB connection to avoid messing up with application transactions