More error checking for updatePassword