Handle ImmediateHttpResponse during login (closes #741)