Yes dogs can tell whether a person or people love them or not.
Just like a dog can tell when you're being mean to them or when you're just disciplining them.
I have a dog and sometimes I will spank him with a newspaper when he does something wrong but he knows that I'm not doing it to be mean and that I'm only doing it because I don't want him doing what he's doing wrong.
He still loves me and I know he still loves me so yes dogs do have feelings for their human companions and do know that you love them.