Various bugfixes

Fixes #12
Fixes #13
also fixes various network issues and lifecycle issues associated with
showing error messages