FIX: Hide form after password reset (PR #14526)

When hide_email_address_taken was disabled, the forgot password modal showed a flash message and continued to display the form causing confusion. This change shows the flash message only when an error occurs and in all other cases it shows a success message and hides the form.

This message used to be a flash message:


LGTM :+1:

How are is it to add a test?