working login and out