Implemented AsyncTask so that http calls can be made in the background