decrease connect timout for faster exiting of the threads
add a check for authorization methods in case of empty list
clean up the code a bit
add mutex to the main thread when inserting new threads