Fixed 401 redirect