fixes issue ZF-7990. set endpoint before authentication.
fixes issue ZF-7990. set endpoint before authentication.

svenax/ZendFramework,svenax/ZendFramework,svenax/ZendFramework,svenax/ZendFramework,svenax/ZendFramework