Can't login from ajax post using frappe rest api

I want to create new resource and I have tried to login from ajax request and it’s perfectly work with any rest client app or browser but whenever I call login method from my mobile app using ajax post. The server send me 500 internal error. I don’t know why it’s not working on cross site authentication.
Please help me. I’m stuck on it.

Check your server logs.

Ok, let me check

Hi rmetha,
I had checked all logs but unfortunately i didn’t find any log file that maintained frappe rest api logs and also I’m new in frappe so can you plz guide me where’s rest api’s log file exist.

@S_M_Shahroz_Allauddi can’t really help you unless I can understand what you are doing. Can you share you code?