refactored to use UserAccount object and setting up magic getters and setters