fixing the login api with json request