refactor to match SPA template. Completed login/logout functionality