Translations:API:Login/20/en

The cookies last for around a month and you should check that you need to log in based on detecting that you're not logged in (rather than logging once per session, for example).