more refactoring of user controller and profile pages
refactoring of rebase