implement email registration