Bug fix, refresh cookie on ajax call