You need to place the code in “al_template.php” in the “ajax-login” folder.
Look for this in al_template.php:
/******* This part is drawn when user IS logged in. *******/
This is where the code needs to go:
<a href="<?php echo get_settings('siteurl') . '/wp-login.php?action=logout&redirect_to=' . $_SERVER['REQUEST_URI']; ?>"><?php _e('Logout'); ?></a>
So now it should look like this:
<a href="<?php echo wp_logout_url('/wp-login.php?action=logout&redirect_to=' . $_SERVER['REQUEST_URI']); ?>" title="Log out">Log out</a>
Hope this helps. ??