Fixing misc test related things
Adding tests for `AuthencationProviderService`
 - fixing a couple bugs found already by the tests