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

This change results in a JavaScript dialog, which breaks cucumber tests.

This reverts commit b3262028dbe96136cc4def5f0d839cddbd925e10.