add a flash method to sdiapi and use it instead of request.session.flash