the basic method: login and logout