handle invalid cookies