added http login function