Added email confirmation handling.