Ensured that if more than 1 key is available and authentication fails for at least the last one, door will open. This is by ending the loop on 1st available key.