Add origin logic so that user always falls on the simulation page he was even when switching profile