String storedPassword = passwordResultSet.getString(1);
if (!checkPassword(password, storedPassword)) {
throw new LoginException("Password for " + user + " does not match");
}
principals.add(new UserPrincipal(user));
}
//Retrieve user roles from database
roleStatement = connection.prepareStatement(roleQuery);
roleStatement.setString(1, user);