Stockholm attack suspect was refused residency