Pipit: pipit_perch_user_logged_in()

Check if a the site visitor is logged into the site’s Perch control panel. Note there is no public API to perform this. So use this at your own risk.

if( pipit_perch_user_logged_in() ) {
    // user logged into Perch control panel
}
link