Issue #577 Redirect user back to root_url if they timeout and make Ajax request

Regarding issue #577

If the user's session times out and he makes an Ajax request, he'll be redirected back to `root_url` to log back in.