properly logs out