Bugfix: authorization with long application id and password failed
Synchronize with java sample