solve auto login loop