[IMPR] Login in newitem script if necessary
[IMPR] Login in newitem script if necessary

newitem.py needs to be logged in to run the script.
Otherwise it raises a strange exception:
AttributeError: 'NoneType' object has no attribute 'startswith'
which is a proper message for that reason. Therefore force login if
necessary tho show a proper message.

Bug: T251520
Change-Id: I0bd09b153ac5dbe7af17d3602f5883218c69a5ac

wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core,wikimedia/pywikibot-core