[eluser]Tpojka[/eluser]
You have to be connected to vanlla user session table for that.
Connect to it and grab data from session table where is marked user as logged_in or not.
I have no experience with vanilla forums, but this is just way you should try.