modifiy session controller. Use flash.now to display error message correctly.