How to reproduce:
- log into Piwik, set for ex. "last7" as default date, log out,
enabled_periods_UI = day,week,month,year
- try logging back into Piwik - you should be served an error message saying that period is invalid.
I guess that in such case, user setting should be ignored and "yesterday" loaded instead or something like that.
Please let me know if this is enough to reproduce issue