Refactor Authentication to support custom Validator