SsoService tests anf fixes