updated user creation logic to catch some errornous user inputs