Email login bug fix