updated userprofile with redirect, and minor clean up