That is exactly the response I expected to see 
Very strange. You could also try curl -i -L localhost:8787. That should probably return the sign in page itself.
Is port 8787 opened in the firewall for the server hosting RStudio Server? I.e. this is showing that you can access the login page from inside the server, but if you are trying to access RStudio in your browser, I presume that you are trying to access it from outside the server. As a result, the firewall for the server will need to allow external traffic to port 8787.
You can also try to curl from elsewhere. i.e.
curl -v -i -L my.ip.address:8787
If it does not return the same results as from inside the server, a firewall or other networking blockage is almost certainly your problem.