Fixed minor bugs in create user