replacing basich auth by own authentication protocol