refactoring : mail password security