if we are loged out and do ajax, we can redirect to login page.
Merge pull request #109 from opf/feature/ajax_session_loss

if we are loged out and do ajax, we can redirect to login page.