How to display a flag to anonymous users?
You can do this in your 'node.tpl.php' by something like below, if user is logged in display flag as normal and if is not logged in redirect user to logging page with destination parameter

global $user;
if(!$user-&gt;uid) {
    // $flag: bookmark or make_feature, $action: flag, $content_id: $nid.....
    $flag_link = flag_flag_link($flag, $action, $content_id);
    $flag_url = $flag_link['href'];
    if(isset($flag_link['query']['token'])) {
        $flag_url .= '?'.$flag_link['query']['token'];
    }
    print l(t('bookmark'), 'user/login' , array('query'=&gt; array('destination' =&gt; $flag_url)));
} else {
    print render($content['links']['flag']);
}