Fixed null pointer exception when the user cancels password entry