Not sure why you are using Flask, but if you want to use a python/django implementation.
We do this in the Holybread code and I could give you access to the Github rep, for you to look at.
Not sure what you are not receiving back and what you are trying to do.
Is it just simple logins?
Posted Using LeoFinance Beta