post credentials through json