Network exception handling

Fixed craching application when user connects to network that requires
logging in.