onLogin method now bails out with an error if username field is blank.