DCLDIDE-1613: rename restriction.validsessioncount to restriction.maxsessioncount; add tests; some fixes