insertUser() function added for register button