Fixed log out script