search function and fixing User and Accounts