Refactor authentication into Mixins