Created cookie to store the users preference.