fixing redirect and profile.