Do I think correctly about the work of the social network?
When a user is already registered, he is authorized.
If the authorization is successful, his login is saved in the session, and is transmitted to all the following pages.
And this login is used to access the database ???