Limit Custom Crawler to front end only

You can try the !is_admin() so your code would be:

function wpse31748_exclude_menu_items( $items, $menu, $args ) {
    // Iterate over the items to search and destroy
    if ( !is_admin() && is_user_logged_in() ) {
        $registerpage = get_page_by_title( 'Register' );
        $loginpage = get_page_by_title( 'Login' );
        foreach ( $items as $key => $item ) {
            if ( $item->object_id == $registerpage->ID ){
                unset( $items[$key] );
            }elseif ( $item->object_id == $loginpage->ID ){
                unset( $items[$key] );
            }
        }
    }
    return $items;
}
add_filter( 'wp_get_nav_menu_items', 'wpse31748_exclude_menu_items', null, 3 );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)