Is it possible that he was just messing with you? A lot of times when you look younger especially I find that they like to kid with you. Keep in mind pilots are a unique group and many of us have odd senses of humor. I don't think I'm particularly gullible or dense but I know there have been a few times captains have given me a hard time and I didn't realize at first that they were just teasing. Someday when you're a captain at a major you'll probable have fun with the young regional jumpseaters, too.
Also, be thankful he wasn't checking to make sure you were a pilot as opposed to a flight attendant. I get that on about 3/4 of the flights I jumpseat on. Not really a problem except when the flight's full and they don't understand that I can actually sit in the cockpit.