Fixed cookie-reference (fixes redirect loop).