wrap the stream object (TMVar Stream) in a newtype
rename StreamState to ConnectionState
rename Stream to StreamState
add Stream newtype
let session fail on authentication failure