Auto reconnection

Try to reconnect automatically when the connection is lost.

Pull request for this card. https://trello.com/c/dIPWHgvj/285-2-as-a-user-i-expect-my-connection-to-automatically-recover-so-that-i-do-not-need-to-handle-it-manually