Client session

merged master and tested