Added email confirmation functionality and environment variable protection.