Thanks for your response. FYI, I did receive an excellent reply on my first post:
Through this I confirmed that I had several IDs associated with snapd. So, taking what courage I could, I purged the snapd and then reinstalled it. It seems to have got rid of the problem, at least for the present time.
I am not sure what caused the problem but I am guessing that a relatively recent change of laptop may be associated with it. I had copied folders from the old machine, and these included the snap folders. Maybe the data had somehow accumulated into a confusing mess.
Right now I can login and logout of snapd with no problem: the only slight concern I have is that my email address does not appear in parentheses when I ran the
http snapd:///v2/users
command. When I run snap whomai it correctly shows the email address.