better login logout