Correctly using profile user ID in back end