Well, each user's profile is just a git repository (possibly on github).
So I'd think about identity/authentication
in the same way users think about it for their code projects.
If you have specific scenarios you're wondering about, feel free to ask.
Something like old school Facebook in UI, but functions more like MSN Messenger. You connect to your contacts via P2P, and download/upload updates to your social media network.
This is an experiment towards that:
https://github.com/dharmatech/9social
The first client is written for plan9. This keeps the design honest. (If it can run on plan9/rc/acme...)
Video demo:
https://youtu.be/q6qVnlCjcAI
The current implementation is less than 3000 lines of code.
And speaking of Emacs... 9social was heavily inspired by an Emacs project called Org Social:
https://github.com/tanrax/org-social