nvestigations of Security Threats and Solutions for 5G and next Generation IoT Systems