Wired logout button to logout function. Moved JS to different file