Merge again with new Arben's code AND display user name

Arben could you check my code please. It seems as if
$_SESSION['user']['name'] is not set.
WATCH OUT it overwrites your index.php and User.php