refactroing
add password logic