set headers and cookie if session_id passed
session_id is a cookie value not json element