Fix infinite loop and prevent crashing if mnesia tables already set up

Fixes an infinite loop bug if user stuff isn't set up properly, and also prevents the installation process from crashing if mnesia is already set up but the rest of the user stuff failed part-way through (which could conceivably happen if the user's power went out or if (As I was experineicing) something was crashing during setup.