The problem was the template was calculating the height of the div before the messages showed up, so I took out that functionality, and let the div just flex normally.
I imagine you could dig around in the javascript to make it take the user to another page upon success, but I wouldn't really know how to do it off hand.