Fixes for login issues breaking things