Fix the create user function, such that it works