Login's logic update.