fixed sending of emails for registration