Dreams are usually the expression of subconscious thoughts. When something like the death of a loved one enters the picture it can become very confusing.
Things that were there but not recognized can come out and because of the attention given to the event they stand out in our memories. That is to say that we remember dreams that we might have otherwise forgotten.
As example your dream about his password. Obviously you knew it at some level. Because of his death the word "grim" takes on deeper meanings. You might have had that dream many times and simply forgotten it, we forget far more dreams than we remember.
At the same time there are things like "deja vu" that are very hard to explain by any rational means.
I recently had 3 dreams, in one night, which I remember very vividly in all three I am contacted by some sort of phone call to a male voice on a very bad connection. The voice tell me that I have to remember a number, that it is the most important thing in my life and that I can not forget. All 3 times I fully woke and was awake for some time before going back to sleep and having another completely different dream, with the exception of the call.
The number is 13 digits but doesn't match up to anything I can find.
Maybe one day I will know but I wonder if I will know in time or after it is too late?