Error trapping and username/pw collection

Traps SQL connection errors and inputs un/pw to the db. Also updated db
scripts accordingly.