Issue #168, #156 - Use jquery ajax requests to wrap xhr everywhre. Delete stats now auto does a logout too.