在puttin php语法之后,我的网站陷入预加载器

I have this code on my php file for navbar:

<?php if(!$session->is_logged_in()) {
        echo '
        <a href="login.php" role="button" aria-expanded="false">
        Login <span class="label"> login to system</span> </a>
      </li>';}
      else
      {
      echo '
       <a href="#!" class="dropdown-toggle" role="button" aria-expanded="false">
                  ' . $session->user_name; . '<span class="badge bg-default">2</span> <span class="caret"></span> <span class="label">it is you</span>
                </a>';
      }
      ?>

I check if the session is set using (!$session->is_logged_in())

If it is not set I should get a login button on navbar.

If the session is set, I should get his username ($session->user_name).

On my website I have a preloader (astral-gaming.com) but after inserting this code and uploading this file, every page which had included it, isn't shows.

It's just the preloader and it doesn't go to the page. After deleting that code, everything is fine. What I should do?

Remove the ; after$session->user_name;