Refactor worker threads making HTTP requests into a seperate class LoginThread. Lets me keep all the locking & end flag logic encapsulated