abstracts spinner code, creates alert on connection failure