MQTT connection not being recognised in void loop()
I believe your problem is that you are attempting to use the MQTT connection before it's actually connected.  So your check:
if(mqtt.connected())

is always FALSE since it's not really connected.  The Adafruit library information here:
Adafruit MQTT
Says to initialize MQTT as:
// Function to connect and reconnect as necessary to the MQTT server.
// Should be called in the loop function and it will take care if connecting.
void MQTT_connect() {
  int8_t ret;

  // Stop if already connected.
  if (mqtt.connected()) {
    return;
  }

  Serial.print(&quot;Connecting to MQTT... &quot;);

  while ((ret = mqtt.connect()) != 0) { // connect will return 0 for connected
       Serial.println(mqtt.connectErrorString(ret));
       Serial.println(&quot;Retrying MQTT connection in 5 seconds...&quot;);
       mqtt.disconnect();
       delay(5000);  // wait 5 seconds
  }
  Serial.println(&quot;MQTT Connected!&quot;);
}