updated cookie
updated ajax with cors functionality and demo