What is the primary function of a captive portal in a network environment?
To encrypt data packets on a wireless network using WPA2
To authenticate and redirect users to a login page before they gain access to the network
To increase the range of the wireless signal
To allocate IP addresses to devices connected to the network