1. A server comprising: a storage unit storing a plurality of modules, and a relationship among a plurality of facial images of authenticated users, a plurality of questions, and a plurality of facial expressions, each facial image corresponding to one or more questions set by the authentication user, and each question corresponding to one facial expression made by the authentication user at a client device; and a processor to execute the plurality of modules, wherein the plurality of modules comprises: an obtaining module to obtain images captured by a camera of an electronic device when the electronic device attempts to login to the server; an analyzing module to determine whether the captured image comprises a human face, and whether the human face matches one stored facial image; a determining module to determine one or more questions corresponding to one facial image according to the relationship if the human face comprised in the captured image matches the one stored facial image; an outputting module to output the one or more determined questions to the electronic device; and an authenticating module; the obtaining module further to obtain user images captured by the camera after one question is output; the analyzing module further to identify the human face comprised in the obtained user image, identify a facial expression of the identified human face, and determine whether the identified facial expression matches the facial expression corresponding to the output question; the authenticating module to determine that the identity authentication is successful each time when one question is output, and a facial expression matching the stored facial expression corresponding to the output question is determined, thereby login the user to the server.