Add login exception handler.