Added Flask login based auth to API

A /users/me/ endpoint has been added to show its workings.

It's more or less a hack, but the thing works, and that is what matters
right now.

Access tokens, Basic HTTP Auth can also be handled by flask login.
https://flask-login.readthedocs.org/en/latest/#custom-login-using-request-loader
Errors and exceptions for the API
Renamed endpoints to be concise