Issue:
fix: cover sso nitpicks and todo changes

Nitpicks
- change parsing login for configs
- refactor terminate auth select
- clear cookie in rotate and reset password

Resolution:
<think>
PR Context:
- Title: fix(users): clear cookie and alter parsing for sso
- Merged: 2024-06-28T08:03:16Z
- Files changed: 2 files
- Commits: 5 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
The PR
- removes cookie after rotate password and reset password
- refactor parsing for sso config, now it uses `serde json from value` instead of `parse value`
- refactors terminate auth select
- send bad request instead of internal server error if invalid id is passed to auth/se
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** fix(users): clear cookie and alter parsing for sso (#5147)
Co-authored-by: Mani Chandra <84711804+Th
Files to modify:


**crates/router/src/core/user.rs**
  Modify existing code

**crates/router/src/utils/user.rs**
  Add:
    - function: pub::is_sso_auth_type
    - impl: impl ForeignFrom<user_api::AuthConfig> for UserAuthType