modified api to test login