Update database script and add group class logic

database: user now has register and name variable