NOT getting how to use SERIAL PORT as a passkey INPUT

Hello World ,
I am recently facing a problem in a program in which I have to take input from the user using the Serial port but i am not able to process the input properly
PLEASE HELP ME!!

String pass=0;
void setup()
{
   Serial.begin(9600);
   pinMode(13,OUTPUT);
}
void loop()
{
   if(Serial.available()>0)
   {
   pass=Serial.read();
    if(pass=="1234")
    {
    Serial.println("Correct passkey");
    digitalWrite(13,HIGH);
   }
   else if(pass!="1234") 
  {
   Serial.println("Incorrect passkey");
  }
}

Serial.read(); reads a single character so what is read will never equal "1234"
Have a look at the Serial.readStringUntil() function

Even better, look at Serial input basics - updated and don't use Strings at all

Simple serial echo test code that captures characters and sends them back to the serial monitor.

//zoomkat 6-29-14 Simple serial echo test
//type or paste text in serial monitor and send

String readString;

void setup() {
  Serial.begin(9600);
  Serial.println("Simple serial echo test"); // so I can keep track of what is loaded
}

void loop() {

  while (Serial.available()) {
    char c = Serial.read();  //gets one byte from serial buffer
    readString += c; //makes the String readString
    delay(3);  //slow looping to allow buffer to fill with next character
  }

  if (readString.length() > 0) {
    Serial.println(readString);  //so you can see the captured String
    readString = "";
  }
}