Fix minor bugs in newUser