sessions are really meant to exist only for a short period of time.
you could modify the sessions behavior to make the data persist even if the browser is closed, but unless you just want it to last maybe a day or so, its not a good idea to use sessions for that.
the default session cookie has a value of 0 for the expiration, which the browser interprets as"hold onto this cookie until the browser is closed"
if you want to change that value, you can use ini_set() to change various session related settings before you call session_start()
ini_set('session.cookie_lifetime', 86400); // 1 day
ini_set('session.gc_maxlifetime', 86400);
you also need to increase the gc_maxlifetime as well otherwise the session file may be cleaned up as garbage too soon
if you start making sessions last weeks or months/years, you will end up with a ton of session files, which to say it shortly, is bad for a few reasons. use a database if you want thier data to exist for long periods of time.
for simple login purposes, you could just set a seperate username and password cookie with a long expiration and forgo using sessions for that.