go on implementing back-end

- implemented writeJson func
- func encrypt should use "%x" to return string
- update User model Id type to bson.ObjectId
- implemented loginHandler handler