Fix authentication server and add gson lib to encode json