Fixed an issue that authenication was proceeded even js client was not ready yet