Insert a error handling to the network code

Now the game wont crash anylonger if the connection to the online server
fails.