Fix problem with database creation routine not setting db version correctly

Also seem to fix up html errors in newuser and users