User profile JS fix to define flow to be used