logout, cleans up some stuff