added middleware to handle 2-stage email verification routes