Dimension reduction for functional regression with a binary response