code: @Override
      public User logIn(String username, String password)
              throws AuthenticationException {
          // Find our user
          String uPwd = file_store.getProperty(username);
          if (uPwd == null) {
              throw new AuthenticationException("User '" + username
                      + "' not found.");
          }
          // Encrypt the password given by the user
          String ePwd = encryptPassword(password);
          // Compare them
          if (ePwd.equals(uPwd)) {
              return getUser(username);
          } else {
              throw new AuthenticationException("Invalid password.");
          }
      }
docs: Tests the user's username/password validity.
  
  @param username The username of the user logging in.
  @param password The password of the user logging in.
  @return A user object for the newly logged in user.
  @throws AuthenticationException if there was an error logging in.