Improve network handling

Now the app doesn't need to be force-quit if the network is unavailable.

Closes #33 and #1.