Fixed both form leaking and emails didn't match errors.

Also added a testcase.