fixed the email confrimation problem and added debug tools