Added jquery cookie and redirect to index