fixed possible hang on login