Fixed a bad behaviour.

Added a missing "else" statement. Now the home page works as expected.
Replaced ```isset($userLoggedIn)``` with ```$user->isLoggedIn()```. This
is
more
secure.