middleware and change pro-profile
fix merge conflicts in profile.js