fixed before login bug