fixed auth bug
implemented redirect to login when request fails with 401