modules is object not array and thecomments showing how to use the library have to be updated.
For instance:
var auth = AeroGear.Auth( "userAuth" ).modules[ 0 ];
should be:
var auth = AeroGear.Auth( "userAuth" ).modules.userAuth;