Algebras generated by two idempotents