fixed error where system failed to login third time