invoke CAS server in gateway mode if user is not authenticated

TODO remote debug prints when stable