Add modal logic for email (incomplete)