Changed the AuthProvider so that it uses interfaces.