Redirect user if they are not logged in

function redirect_user() {    
   if ( $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] == 'www.abc.com/' ) {
        if ( ! is_user_logged_in() ) {
           wp_redirect( 'http://www.abc.com/de/' );
           exit;
        }
    }
}
add_action( 'init', 'redirect_user' );

Do you mean something like this?