This is (in my experience and opinion) a bug. @ScuffR, there should not be any need to have a delay, but yes that should fix it. I have had two topics with conversation about this in the forum. delay(10000) before client.connect() should fix it.
The reason why Serial works is because of the delay of the Spark waiting for you to connect the Serial port.