Updated beforeRender to overwrite Session flash messaging to replace default element with plugin element