Imlemented Cookie functions. Need to test them now