Trying to spot what's wrong in the loop

Guys, thank you all for your help, I found the problem.

Based on what Garner said about the escape characters, I decided to view the output with Putty instead of the Arduino IDE serial monitor to see if I still had the same result, it turns out that in Putty my program works fine.

As opposed to the serial monitor in the Arduino IDE, when I use Putty and I enter # 1 to deactivate the alarm (I chose 1 for the sake of simplicity), there's no need to hit 'Enter' to send the actual key, the alarm is deactivated as soon as I hit 1. Because in the serial monitor of the Arduino IDE I hit two keys (1 and then Enter) my program reads the two keys one after the other, that's why every time I send a 1 and it goes to the next function I get theĀ  WRONG PASS message, basically what the program is reading is the Enter key which is the second key I press.

Hopefully this will help someone else in the future, I hope it was clear! cheers.

I guess the way to avoid this issue with the Arduion IDE serial monitor is by writing a program that ignores the Enter key after entering my password? it's still more comfortable for me to use that monitor than Putty.