worked on function called upon successful post for password