Loging in and Out

Hey there,

I am wondering how i users can sign into the forums from say the home page. I have created a form that goes to forums/index.php?login/login but when i do a test login in it displays an error. Is there any way i can use an external login form so users can login from the site home. Also how can i set up external log-outs. Right now this is the code i have
./forums/index.php?/logout/_xfToken=<?php echo $visitor->get('csrf_token_page'); ?>
how ever it does not seem to be working