Added email confirmation functionality