complete REST controller, add email support for /register