fixing logout redirect loop