How to link from webpage.php to jQuery function

How to link from webpage.php to jQuery function

Hi all,

I'm trying to check if user is logged in or not. So I'm using sessions for it.
Now my doubt is, if I had user name in the session I want to hide the Login button.
I'm validating session using php so I want to invoke a jQuery().