Add autoload cookies for interactive functions

Please see this patch