added loading spinner while waiting for promise from firebase to be fulfilled for better UX