Add MAC verification to responses

Add MAC verification to server responses
Add error handling for network timeout