added refresh cookie stuff