improve password functionality