The city of South Portland and the owners of two motels have reached a tentative agreement that will allow the motels to continue operating if they increase security. The agreements came after the South Portland City Council in May decided not to renew the operating licenses of The Maine Motel and The Knights Inn after several incidents of alleged prostitution or drug-related activity at the family-owned-and-operated motels on Route 1.