Update Authentication.php

I've added a SSL proxy check. If a SSL proxy is used, domain and path of cookie have to be set differently.