Adjusted replaceTokensLogoutUrl

Replaced split/join for replace with regex to replace tokens in the logout url.