public MappedUser userAndPasswordMatch(String username, String password) {
        if (username == null || username.trim().isEmpty() || password == null
                || password.trim().isEmpty()) {
            // return immediately under various conditions
            return null;
        }

        final List<Object> values = new ArrayList<Object>();
        final List<Class<?>> types = new ArrayList<Class<?>>();

        values.add(StringUtils.lowerCase(username));
        types.add(String.class);

        values.add(password);
        types.add(String.class);

        ResultSet rs = execute(SELECT_ALL_USER_AND_HASHPASS, values, types);

        MappedUser user = null;
        try {

            if (rs.next()) {
                user = new MappedUser();
                user.setId(rs.getInt("id"));
                user.setUsername(rs.getString("username"));
                user.setActive(rs.getInt("active") == 1);
            }
        } catch (SQLException e) {
            log4jLogger.error(Conca.t(
                    "SQLException occurred while attempting to auth user:{",
                    "username=[", username, "]"), e);
            closeAndReconnect();
            return null;
        }
        return user;
    }