Those values are passed by the browser each time the browser calls a page that it's been logged into. PHP just reads that information in at the beginning of each page call and puts it into those variables for your use. PHP doesn't remember who the last user was, or what the password was. It's told each time the browser connects.