auth/credentials: Rework credentials handling to try and find the most recent machine pw