redirect to login if REST returns 401
mocha test for showing login when not logged in