add server login logic