I think the problem is that you're closing your first div tag before you give it the style property.
Why don't you try something like this:
<div id="menuLog" <?php
if ($userLoggedIn == 1) {
echo ('style="visibility: visible;"');
} else {
echo ('style="visibility: hidden;"') ;
}
?>>
</div>
you could also try the display:none; to hide or display:block; to show, don't know what you want to do.