Fix history api bug in user.js