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