Pion photoproduction on the nucleon in the quark model