Added logout callback

The processLogout() function now accepts one parameter [callback] which
is a custom Javascript function you may pass in that will get called
when the logout completes (success or fail). Use this for checking and
responding to the logout completion in your site/app. Previously we did
a header() redirect to the home page but this didn't always work.
Instead you can call window.location from your callback to reload the
home page.