Switched comparison to correct fields

fields[1] is the user ID. fields[2] is username. fields[3] is password