Added code for cookie and inserted progress bar