Found the problem. In the plugin, I had to surround the functions with:
if ( !function_exists(‘wp_login’) ) :
…
endif;
and
if ( !function_exists(‘wp_setcookie’) ) :
…
endif;
you don’t need these function_exists checks in 2.0 in your plugin but you certainly need them in 2.2.1