The wordpress logout way requires you to redirect to their logout page. Nice way is to use a custom url, in this case pointing to /logout, and code (no need to create page)
if ($_SERVER["REQUEST_URI"] == '/logout')
{
wp_logout();
wp_redirect( home_url( '/' ) );
die;
}
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.