Added flask restful. Serialisation to json less manual now.

Also added basic auth