import pywikibot as pw
site = pw.Site("fr", "wikipedia");
site.login(sysop=False, autocreate=False)

if site.login(sysop=False, autocreate=False):
    print('login')
else:
    print('not log in')
not log in