Make sure a session has been started prior to using it

Thanks Anomie for pointing this out.

Change-Id: Ieaa9847e74c35e3080dabeaef8895209bfcc675b