Fixes and json function

+New query to check the users in the database
+Fixed the printing of the query result
+Added a functionality to push the result into a json string