Thanks to the growth of cloud computing and network technology, different organizations might want to share data and resources between each other. However, cross-organizational authentication systems usually need a central control system, which must be fully trusted. Thus, we use blockchain technology to store the access control list of users due to its tamper-proof and decentralized feature. Our system also provides authentication/authorization/accounting functions by using a virtual coin execoin to achieve accounting function. The method of one-way hash chain is used to securely adapt to the transparency feature of blockchain. In authentication system, the transparency may lead to the linkability problem. In our scheme, attackers cannot get the linkability between the transactions and the particular user. To the best of our knowledge, our scheme is the first blockchain-based authentication system with the merits of unlinkability and accounting.