ok guys i need some expert help here, currently im using sessions for my login

once a user logs in i create a session

$_SESSION['username'] = $Username;

and then on other pages i use stuff like

if (isset($_SESSION['username'])) {
//allow acess..
}

but is there a better way? because when i log in and go 'back' to previous page it says 'info lost' you must refresh etc. isnt there a way i can go back smoothly?