When you are leaving your home, have him chase a treat or a toy that you throw at the last possible moment before you open (and quickly close) the door.
When you are returning home, have an emptied soda can that contains several stones or pennies. While you are opening the door, vigorously shake the can. He'll likely consider the sound to be so unpleasant that he will bolt from the area. The hope is that after experiencing this numerous times, he will get in the habit of backing away from the door and you won't have to shake the can anymore, or at least not everytime.
These are just a couple of ideas; I'm sure there are other approaches that work equally as well.
I'm not crazy about the squirt bottle idea for when you return home. You'd inevitably have to spray him in the face because he'd be facing you. Even if this solves the trying-to-escape issue, he may wind up getting an ear infection if too much water ends up in his ears. Or you might make him afraid of water, which would be very unfortunate if you needed to regularly give him a bath later on in his life. Plus he might associate you with the unpleasantness of getting sprayed and fear/mistrust you to some degree as a result.