     delay(10);
     client.stop();
   }
+
   if(digitalRead(push_btn) == LOW){
     auth_user("keluar");
     open_door();
   }
-
-  if(device_status){
+  
+  if(device_status && !device_isLock()){
     char key = keypad.getKey();
-    if (key != NO_KEY && key != '*'){
+    if (key != NO_KEY && key != '*' && key != '#'){
+      isInputting = true;
       pass[count] = key;
       count++;
     }
     if(key == '*'){
+      isInputting = false;
       attempt++;
       auth_user(pass);
       sys_init();


EthernetServer server(80);
boolean device_status = true;

const byte ROWS = 4;
const byte COLS = 3;
char keys[ROWS][COLS] = {
  {
    '1','2','3'  }
  ,
  {
    '4','5','6'  }
  ,
  {
    '7','8','9'  }
  ,
  {
    '*','0','#'  }
};

byte rowPins[ROWS] = {

  pinMode(push_btn, INPUT);
  digitalWrite(push_btn, HIGH);
  myservo.write(70);
  Serial.println("Ready");
}

void loop(){
