Logout via api; fixed duplicate data bug