Added more logic for the user structure