Fix problem with ajax call needing authentication