Abstract: Technical network challenges in 5G relates to handover authentication, user privacy protection and resource management. Due to interoperability requirements among the heterogeneous networks (Hetnets), the security requirements for 5G are high compared to 2G, 3G and 4G. The current 5G handover protocols are based on either fuzzy logic (FL), artificial neural networks (ANN), blockchain, software defined network (SDN), or Multi-layer Feed Forward Network (MFNN). These protocols have either long latencies or focus on either security or quality of services parameters such as user satisfaction. The usage of these inefficient authentication schemes during 5G handovers lead to performance degradation in heterogeneous cells and increases the delay. In addition, 5G networks experience frequent handover failures and increased handover delays. Consequently, the provision of strong security, privacy and low latency handovers is required for the successful deployment of 5G networks such as 5G wireless local area networks (5G-WLAN) heterogeneous networks. These new requirements, coupled with demands for higher scalability, reliability, security, data rates, quality of service (QoS), and support for internet of everything (IoE) have seen the shift from 5G to beyond 5G (B5G). However, 5G and B5G are incapable of providing the complete requirements of IoE such as enhanced security and QoS. This paper sought to develop an ANN-FL protocol that addressed both security and QoS in 5G and B5G networks. The simulation results showed that the developed protocol was robust against attacks such de-synchronization and tracing attacks and yielded a 27.1% increase in handover success rate, a 27.3% reduction in handover failure rate, and a 24.1% reduction in ping pong handovers.