first step of comunication: login and logout