login server logic edited