President lashes out at elite, religious leaders at national prayers event