reordered the place of the networkaccessmanager, send a quit signla to the eventloop to properly the the loop
reordered the place of the networkaccess manager