added logic to creating user