added logic to check if user exist on creating new user