Lag spike detection, added timeout to reading from server for 5 seconds

The server should always respond within 5 seconds.