Including site FUNCTIONS in IA maps and card sorting exercises

This question is both about information architecture maps and card sorting exercises. First, regarding IA, should an information architecture map include site functions, like login and out, or just actual pages? Search would be another example, perhaps a better one - should site search be included in a site map? The search results are usually presented in a page but what about the site search function itself - should it be included in a IA map?

The second, related question, has to do with card sorting exercises. Should FUNCTIONS one can do in a site, like attach images, login, search etc be included in the cards to sort?These are not pages per se that one can navigate to but rather functions one can do once you get to the page…I’m thinking here of a task/project management application. I’ve seen a lot of card sort exercises that DO include these but I am never sure if that is something valuable to do or just confusing. (I find it a tad bit confusing although I understand the intent)