Electron localization and interaction in two-dimensional magnetic films