Hi aspsun11,
Refer below link.
In the above link datetime is returned from Web API method.
In place of that you need to pass ueser entered username/id and passwod to Web API method and write code for validating user entered password and username/id and return response as per your need and redirect user if valid login.
For passing parameter using jQuery Ajax refer below article.