For everything WebDAV, CalDAV or CardDAV related issues like the re-appearing Login window in Lightning we have the following FAQ containing all needed info:
If you can’t fix your issue with those resources you can also upload the .ics file of the calendar to the WebGUI and click on it there. With that you can import the .ics file into your calendar.