change flash messages to use the DB as storage