So I think you just need to change your "||" to "&&".
I'm thinking and typing here.
I think the purpose of your backDoor is an auto-escape from the loop.
If I'm correct, then you don't need to check userId2 != backDoor in your first if-statement. Remove that and leave the first part if your logic in place.
This means you are only allowed an opportunity to enter the password IF you have chosen a registered ID.
This means in the second if-statement, you don't need userId2 != userId because that was already checked in the first if-statement.
Now all you would have to do is place the loginTries counter in the first if-statement and adjust the error message.
**Note I also think you're trying to not allow the person inputting the info to know which of the two inputs they (did) was wrong. So for that, I'll post a follow-up code that meets that criteria, since that's different than what I said above ^^^