This allows the user to use the system settings as well, and not always force light or dark mode in the app. Also move the logic to the UserProvider and do some light refactoring.