Refactoring username virtual attributes to remove duplication