issue #2: password validation failure due to policy: redirect to resubmission, instead of error page

password validation failure due to policy: redirect to resubmission,
instead of error page.
also, changes in oAuth2-sample issue #8