Fixed PW null on first launch and disconnect logic