Two Labour-run councils are considering legal action to stop the use of hotels to house migrants in their areas after Epping council won a temporary injunction.