Implemented the auto reconnect preference.