I am writing a plugin that will redirect the user after logout. If the user provides a link then redirect the user to that place else use the default URL. Here is the code I