Fixed login error display and bug where user can access settings pages when not logged in