update controller action to render the correct page on failure and add error message