properly adds session_id cookie, refs #4