Added some error detection to Session object

- dtor checks state of owned socket object
- invalid login state reported and default assigned on detection
- Session->Write() checks socket is still open before writing