adding logic to process logout url in to a gateway URL