bug fix: login if needed