Add login message; refactor