more work on _im. figuring out routing and rendering of templates based on user authentication.