Add database indexes on users and images