Refactor logout handling in server core
The server core's hydra.go file has been refactored to centralize the logout handling process. This involves changes to the ApiConfig struct and extraction of the logout handling functionality into a separate dedicated function. Furthermore, this functional adjustment allows cleaner and more maintainable code for handling user logouts, enhances code readability and respects the single responsibility principle.