ajax + cookie struggles