Moved the login code into the app code.  I am thinking it might be a
better idea to call out scripts in yaml than using this JS method.