fixed Auth.t

and some refactoring in Global.t and Apache.t