work on templating, redirecting after login