Logout oand login functional. Control the monitoring correctly