RFID Flooding

Hey, I'm writing a program for reading and checking RFID cards. However I have encountered a problem with flooding. If I hold a card on the read for too long(more than half a second) it will print twice. It will go through the check once and after a delay for 7 seconds it will go trough again.
I am using the Arduino Uno and RDM630.

#include <SoftwareSerial.h>
#define rxPin 6
#define txPin 7
SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);
String tegn=""; 
String kode1="5000893AF310"; 
String kode2="5100FEA91F19"; 
byte teller=0;

void setup()
{
Serial.begin(9600); 
mySerial.begin(9600); 
pinMode(9,OUTPUT); 
}

void loop()
{
  
  if (mySerial.available() > 0)
                            {
                           teller++;
                           tegn = tegn+(char)mySerial.read();
                           if(teller==14)
                                         {
                                         tegn=tegn.substring(1,13);
                                         
                                         if(kode1==tegn)
                                                       {
                                                        Serial.print("Gregor");
                                                        Serial.print(";");
                                                        Serial.print("Kontorpersonell");
                                                        Serial.print(";");
                                                        Serial.println(tegn);
                                                        digitalWrite(9,HIGH);
                                                        delay(4000);
                                                        digitalWrite(9,LOW);        
                                                       }
                                                      
                                         if(kode2==tegn)
                                                       {
                                                        Serial.print("Joshua");
                                                        Serial.print(";");
                                                        Serial.print("Administrasjon");
                                                        Serial.print(";");
                                                        Serial.println(tegn);
                                                        digitalWrite(9,HIGH);
                                                        delay(4000);
                                                        digitalWrite(9,LOW);¨        
                                                       }

                                         tegn="";                                  
                                         teller=0;
                                        delay(3000);
                                         }
                             }
 
                        
 }

You could add a String (ugh!) to hold the last tag read, and not care about the value read from the tag if it is the same as the tag read last time. You probably want to record when the last tag was read, too, so reading the same tag again 2 days later is OK, but 2 seconds later is not.