fixed login procedure. The first user is allowed to login as admin
added methods to the rest api to update email, password and isAdmin of a user
more consistent rest api
refactored logging and error handling
cleaning up code