Fix some issues.

Use correct email function. Forward to correct URL when email sending
fails.