made login/logout redirect to /reload, so that we force a real reload of the entire app (for some mysterious reason, a redirect to an appcached page doesnt seem to run ANY javascript in the target page). made login and logout completely a server responsibility (no login/logout urls in the js). made the login/logout buttons show/hide depending on login status. added preflight and reload endpoints along with login/logout.