renamed login to index
added sorting to table