Registers user with database