factor out keyunlocker (and locker, maybe?)

fix more corner cases with ebryonic users