Fixed some WiFly bugs

Now WiFly is able to auto-reconnect after long periods of time without a
connection.