Doesn't Hampton still have the 100% satisfaction guaranteed offer? I remember complaining about something minor once and they simply comped the room.
That said, if OP was aware of the door not closing/latching properly, there should have been an immediate conversation with the front desk upon discovery. I would NEVER go to bed (or even stay in the room awake) if it didn't properly latch.
In the rare instances where I've stayed in a room in a "inn" that didn't have a functioning deadbolt, I've usually moved some furniture in front of the door. It may not completely stop someone, but should be enough deterrent to avoid inadvertent walk-ins and would also wake me up. I never understand why people don't automatically latch the deadbolt/security device as a matter of habit when walking into the room.