refactoring user pages