Fix register redirect and warning in profile page.