 }
 
 void loop() {
-  if (musicPlayer.playingMusic) {
+
+  if (playing && musicPlayer.playingMusic) {
     musicPlayer.feedBuffer();
-  } else if(playing) {
+  } else if (playing) {
     playMp3();
   }
 
+  handleRfid();
   server.handleClient();
-
 }
 
 void handleRfid() {
-    // Look for new cards
+  // Look for new cards
   if ( ! mfrc522.PICC_IsNewCardPresent()) {
     return;
   }

    return false;
  }
  Serial.print(F("Data in block ")); Serial.print(absoluteBlock); Serial.println(F(":"));
  dump_byte_array(buffer, 16);
  Serial.println();
  Serial.println();


  return true;
}


void print_byte_array(byte *buffer, byte bufferSize) {
  for (byte i = 0; i < bufferSize; i++) {
    Serial.print(buffer[i] < 0x10 ? " 0" : " ");
    Serial.print(buffer[i], HEX);
