Added Logout Callback

Added in a callback handler for the logout function so that the client can know exactly when it's safe to exit the process after calling `logout()`