added email confirmation code (unfinished though)