Created function for searching for a user