Password changed logic