tidied JS, attempted OTP query with php