Untested intern queries

Added username search functionality for sql tables, Untested.