if(username.equals(usernameArray) && password.equals(passwordArray))


The above code compares a String object with an array of Strings...and will evaluate to false. You will need to loop over the...