Fix dodgy spelling, declare var i so it isn't global.
Remove duplicated method parameters.
Remove global strings, attach them to the opened window instead.
endpointAlias changed to a url parameter so that it doesn't need to be
global.
Need the cancel on the loginWindow
Remove the onclick from the html, this was changed to be handled in dojo
and so showed an error in the console.
Merge pull request #266 from fmoloney/AuthFix

Auth fix