add sorting to table and sinple autorization