Sessions don'e have a username, they just have an ID. That's all.
When any user comes to your site, PHP will assign a sessionID to that user.
This session ID must then be carried to each and every page that the user visits on your site, either through cookies or the URL. That way, the session data is linked to that particular user's "browsing session".
So far this has nothing to do with usernames, passwords or anything at all.
If you want to make your users login, you give them a form where they can enter their username and password.
Then you compare the username and password to entries in a database for example.
If the user is allowed to logon, you set or register a variable in his session, that simply says "loggedon" or something similar.
If you correctly carry the sessionID to all pages, the session data will be automatically available on each page and you should be able to check that the user is logged in or not by checking the variable in his session.