Fix Login process bug