public static User login(String name, String password) {
    String[] cols = { "uId", "name", "balance", "isManager", "city" };
    String[] nameArr = { name };
    String[] passArr = { password };
    ArrayList<User> users;
    User loggedInUser = null;
    System.out.println(name);
    System.out.println(password);
    SelectBuilder sb = DBIO.getSelectBuilder(cols, "User");
    try {
      sb.addStringCondition("name", "=", nameArr, true);
      sb.addStringCondition("pass", "=", passArr, true);

      users = result2User(sb.executeSelect(con));
      if (users != null && users.size() > 0) {
        loggedInUser = users.get(0);
      }

    } catch (SQLException sqlE) {
      return null;
    } catch (Exception e) {
      return null;
    }

    return loggedInUser;
  }