implemented log out process