Dual-mode GC authentication routine, fixed incorrect invalid login behaviour in new SSO code.