public static boolean login(String email,String password){
  PersistenceManager pm=pmf.getPersistenceManager();
  try {
    UserRecord user=findUserByEmail(pm,email);
    return user != null && !Strings.isNullOrEmpty(password) && password.equals(user.getPassword());
  }
  finally {
    pm.close();
  }
}

public static boolean login ( String email , String password ) { PersistenceManager pm = pmf . getPersistenceManager ( ) ; try { UserRecord user = findUserByEmail ( pm , email ) ; return user != null && ! Strings . isNullOrEmpty ( password ) && password . equals ( user . getPassword ( ) ) ; } finally { pm . close ( ) ; } }
returns whether the password is same .
