`doAPI`'s `context` does not work due to `WithContext` immutability. `Authenticate` and `RegisterApp` does not use `context` although they needs `context`, so their `context` does not work also. This commit fixes them and add test cases.