Added login message logic