Many things that seem miraculous are actually quite simple once you strip them down.
Attach a cord to the back of a door; whenever someone opens the door, it triggers a mechanism that fires several poison darts and crossbow arrows powered by compressed air. It's extremely simple, provided you have a sense of precaution.
The most elite former agents, even after retirement, retain their unwavering confidence and decent skills, always prepared to fight at any time. So no matter when Yuri shows up, he's bound to be detected.
Some people never manage to sleep well, not even till death—they even have to recognize they're dreaming within their dreams.
As for Yuri being able to use the password to unlock the door, that's simply because he knows the old man too well. As everyone knows, people tend to stick to fixed passwords to avoid forgetting them.
This might be excessive for an agent, but for an elderly man suffering from Parkinson's disease, it's perfectly reasonable.