fix bug where can't auto login