Added code to extract SessionID.