Electron energization and transport in the magnetotail during substorms