An optimized authentication protocol for mobile networks