#117 fixing logout bug and escape JS that was causing weird location names in the header