There must be problem in reading or could be there a extra character somewhere?
You need to answer that question. Some reasonable effort at printing the data would be useful.
Serial.print("pass: [");
Serial.print(pass);
Serial.println("]");
If you see:
pass: [whateverYourPasswordIs]
you know one thing.
If you see:
pass: [whateverYourPasswordIs
]
you know another thing.
Just printing pass by itself tells you a lot less.