Added cookie processing