Added an example of RESTful API implementation, method POST /api/login
Fixed several bugs in the user authentication area
Merge branch 'dev'