You are totally unsuitable for scripting
At first:
What is checklogin?
Password contains only numbers? If no, why the hell you convert to integer the string?
Please use that frigging iPrintln() to print the values of the variables. We are not wizards who can read your minds.
And finally, write an acceptable script, because it's less than amateur.