What I'm doing is using vB's system for login etc (it has more then login only, it has protection etc)... then I wrote my own script to check with vb's cookies if a user is logged in (not calling init.php etc) which loads another shitload on code... I guess that's the best option
Else, very simple: you need to look into the code how vB's hashes passwords, it's not very complex