Updated createUser to create new User object and pass username and password