fixes to use of clientid. Changing default of clean session to 1