test login and logout