Improved support for login in the web client (JavaScript).

It now handles error codes and success properly and shows who is logged
in when it is successful.
Fixed the object deletion web client code which was showing errors at
the wrong time.
Added Database.user for looking up the username given an ID.
Changed the API decorators to parse the geoID as an int.
Extended Database.addGeometry to accept the username.

This is in prepration of recording who created the object.
Changed the Database.login function to return the user ID instead of just
True/False.
Added support for logging in using Flask-login.

The create, edit and delete geometry methods are now require the user to
be logged in.