Moved authentication to a provider to allow other auth libraries (#4)