Add registration tests (with emails). Fixes #437