fix login bug in last commit