This is so when the session expires, the logged in user details are expired as well, which wasnt happening with cookies.