Fixed major bug in both asyncTasks so that now it is possible to connect to a server