apply decorator pattern to solve password is visible problem