Add a login page that will provide a security token.  Factor out authentication code to allow reuse in login page.