Fixed some more bugs, added basic validation of username/password, refactored names of functions and path of registration (now it is /register and api/v1/register), added /v1 to API path and addded /api/v1/logout and /api/v1/register