Switching to use client sessions

a first pass, will allow passing in crypto options via config