Impact of device resistances in the performance of graphene-based terahertz photodetectors