To see only the “publish” post, you have to specified the “post_status”.
The documentation of the wp_get_recent_posts function said, that if no “post_status” is specified the function used the default values “draft, publish, future, pending, private”.
$defaults = array(
'numberposts' => 10,
'offset' => 0,
'category' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'include' => '',
'exclude' => '',
'meta_key' => '',
'meta_value' => '',
'post_type' => 'post',
'post_status' => 'draft, publish, future, pending, private',
'suppress_filters' => true,
);
To distinguish between logged in and unlogged users, you could use the function is_user_logged_in