Redirect on Logout

Refactor redirect method for logout routes.