Update - 2013-07-31
So, giving a quick update to what I did to pull this off. It will require 4 pieces (Marionette/Backbone only, you will still need the web service replying to sessions requests) to effectively work. I created a Gists for anyone to look at. Feel free to update the gists and I'll pull the code, granted that it's free of bugs.
I use jQuery, require.js, text require.js plugin, handlebars and moment.js. main.js includes all hooks for using handlebars to load the template from disk or cache, instead of embedding them into the HTML at runtime, and providing a helper to use momentjs in the temlate. If you have any questions, feel free to post them up.
Gists: https://gist.github.com/dkleehammer/6126639
Update!!
I believe I have come up with a working solution. I will continue to test and will pass to the creator and see if he wants to look it over and add it to his blog. I've seen a bunch of questions related to backbone and authentication, hopefully this will help anyone else out.
Original!!
I'm having trouble with server-side session handling and backbone + marionette. I have a session model that I'm basing this application off of. The session carries data such as authenticated flag, session id, user id, etc.
I've attempted to do this many ways, but I still run into a single problem; a split second timing issue where we are waiting on the server to respond with the current session status and the router is trying to decide if we need to be sent to the login page or to view in a specfic region. Once authenticated (after login, of course) I'm sent to the index hashtag, but if I refresh the page that fraction of a second the model returns as undefined and returns to the login hashtag. This is a problem for anything else that uses the session model data during rendering.
What is the best way to do a server-side session application with marionette? Does someone have a good example of using routing and server-side session with backbone+marionette?