Started adding login/logout functions and breaking it up. Still working.