added code to send out emails after verification