attempt at adding onError to auth typeclass