Iguanas are very hard to take care of. Until you can find someone who knows what they're doing to take it, I suggest.... Keep as warm as possible up to 80 degree minimum. A diet of collard and or mustard greens plus whatever fruits and veggies on hand will do for the short term. If possible get a large tub for it to soak in warm water. He should use it as his bathroom, too which keeps the cage clean. A pillow to lay on is nice. I use lots of peeled and chopped cucumbers in my igs diet to help prevent dehydration.
Tail whipping is probably because it's scared. Be warned they can bite very hard. If he acts more aggressive get some leather gloves.
Hope that helps. Let me know of any more questions.