Private repo url redirect to github login instead of 404 error

I have private repo and the issue page and few other wiki page links can be accessed from our website so now when they click on those links without logged in to github its showing 404 error. I noticed gitlab takes them to login page and upon login it shows the actual page if they have access to it.Is there a way to achieve the same in github?