Fixed bugs with user creation