working login logout