Dynamics and instability of current-carrying microbeams in a longitudinal magnetic field