public UserRole login(String userName, String password) {
        UserRole userRole = null;
        String query = "SELECT * FROM USER_ROLE WHERE USERNAME=? AND PASSWORD=?";
        try {
            PreparedStatement statement = connection.prepareStatement(query);
            statement.setString(1, userName);
            statement.setString(2, password);
            ResultSet resultSet = statement.executeQuery();
            if (resultSet.next()) {
                userRole = new UserRole();
                userRole.setId(resultSet.getInt("ID"));
                userRole.setHakAkses(resultSet.getString("HAK_AKSES"));
                userRole.setUserName(resultSet.getString("USERNAME"));
                userRole.setPassword(resultSet.getString("PASSWORD"));
            }
        } catch (SQLException ex) {
        } finally {
            return userRole;
        }

    }