Tests login logout