Session ID management

Also fixed carriage return bug in typing