Fixed the wrong redirect path when logout in some condition