If a custom plugin has been defined in a <js-module> element in the plugin.xml, you do not need to reference it in your index.html. The plugin object is added automatically to the global window object once the deviceready event has fired. The name of the plugin object is the same as the clobbers target of the <js-module> element. In your case the clobber's target is AeroGear, so you can access the plugin by window.AeroGear once the deviceready event has fired.
Restore the plugin.xml to its original state and just use the plugin like so:
Another thing I should mention is that custom plugins cannot work in the AppBuilder Simulator. You should test them only on a real device.
I have attached a working project for reference. It alerts the raw password on app start.
Let me know should you have any other questions or experience further problems.