improved session_id extraction.

This allows multiple options, like 'Expires', to be set and still extract the id