optimize logout redirect