Fix #1489

Fixes #1489.
This Pull request fixes a bug in TBG where the VCS integration plugin would fail to receive notifications
about new commits through the HTTP-API when guest access was denied.
Instead of redirecting the VCS hook request to the login page, it now gets to the right place.

Maybe this is not the most elegant way as this change affects a plugin but was done in `core` but it works and I did not find any other way to do this.

See: http://issues.thebuggenie.com/thebuggenie/issues/1489