added cookie redirect