fixed auto login bug