detecting if user has a session open and adding directives for authentication

for https://github.com/ProjetDeRechercheSurLecriture/DyslexDisorthGame/issues/167
closer to fixing https://github.com/OpenSourceFieldlinguistics/FieldDB/issues/1198