Remote authentication protocol can effectively guarantee the communication security of remote users and servers in the public network. We provide a kind of anonymous and secure authentication scheme of identity authentication, by the dynamic change of the login ID we can ensure the anonymity of the user login, utilizing the user and server mutual authentication to establish a shared session key that can resistance to man in the middle attack and replay attack. According to the above measures, we realize the security and privacy of users,and the BAN logic analysis is performed to demonstrate the effectiveness of the improved scheme. The security and performance analysis of the proposed scheme shows that the new protocol is more secure and efficient than the same type of scheme.