add authentication function of mengodb