Add password-policy service detection; add tryAll step; refactor globalstate.