UF-36: switching to uf_security_check for the benefit of AS/EAP/WFLY
UF-36: fixed the redirect-on-login so it works with form based auth on AS/EAP/WFLY