Fixed JS console errors that appeared upon logout