Made DB connection global to use in handlers

Make error response functions to handle normal server errors and
multiple errors

Implement user creating, not completely finished yet. Doesn't return
successful JSON response

Add types and methods for user and device creation and validation, not
to flexible yet.