factorifies loginlogoutspec