your phone shouldn't open. It should stay shut. but to get it to turn on, put it into recovery mode, and then from the menu, hit reboot, if it doesn't even get to recovery mode, you've got a dead battery. replace it.
relax. Get some rice. get a bowl. Make yourself the rice and eat it. Then, take isopropyl alcohol. open up your device and using an antistatic brush, scrub down the whole motherboard with the alcohol. Then put it in an ultrasonic cleaner, or have a pro do this. if it still doesn't work, take it to a board level repair specialist. Then, while this is probably overkill, get BGA chip x-rays done to know the bga solder joints weren't corroded.
STOP! DO NOT THROW AWAY THE BUTTON! get a microsoldering expert to transfer the NXP chip from this broken one to another used and apple genuine one. Touch id will be retained. If you already threw the home button away, take it out of the trash and guard it with your life. Yes, even if you have to dig through dirty diapers and cold chili.
take the board out of the phone and clean with isopropyl alcohol, then put it in an ultrasonic cleaner (or have a pro do that) and then get it checked out by a board level repair man. Then if you really want, ask for BGA X-rays to make sure the BGA chips haven't corroded underneath Then buy a new home button from ifixit, and once you receive it, go back to the board level repair expert you went to for the ultrasonic cleaning, and have the NXP chip on the new home button replaced with the NXP chip from the old one. Then toss your old home button in the trash, and install the new one. You will not lose touch id functions if you do this.
take board out, scrub it with isopropyl alcohol, rip off all emi shields, give it an ultrasonic cleaning (or get someone else to do that for you). then buy a new touch id home button from group vertical. They actually have touch sensors inside them, the group vertical representative told me (i'm buying one for an a7 pairing experiment, just bought it an hour ago off amazon, link here: https://www.amazon.com/Group-VerticalÂ-Button-Replacement-iPhone/dp/B00I7BAQXU/ref=sr_1_8?s=electr...-8&keywords=iphone+5s+home+button&refinem...-99999999 )] Get both of those buttons to a board level repair specialist, and ask for him/her to take the NXP chip off your broken button and solder it onto your new button in place of the one already on there. If they do it right, you shall retain touch id. But if I'm wrong about this, I take no responsibility for this statement or any damages that may occur or anything else you could sue me for.
dissasemble and scrub down the whole board with an antistatic tooth brush dipped in rubbing alcohol. replace the battery. remove all the water damage indicators, they are broken now. Replace if you want after cleaning the board in an ultrasonic cleaner. Then if phone acts funky, take it to a board repair specialist. reassemble and tada!