Added flash messages in db controller.