Revert jQuery and fix logout bug