Getting cookie content and passing it to script