Modifed Login/Logout method, Fixed index.cgi if not logged in