used wordpress API call for logged in user check