S5 Quinn question

After Quinn gets rehabilitated, how does he end up with the Jihadists who use turn on him? I realize he meets them at the apartment, but why does he go with them to Syria?