added options to session middleware