Httpserver that takes json request to authenticate