added flash messages on controllers