Fixed callback in createUser function to pass back error along with user