app: show progress bar while downloading

Also separate the http request code from the file copying.