Put root and user password requests inside while loop.  Make sure they stay there until input is finished and don't exit out.