move login toggle to class