support single sign out and fix redirect error