implement password functionality