If your chrome version is 50, then you’ll encounter that HTML5 Geolocation API is not working. In Chrome version 50, HTML5 Geolocation delivered over HTTP no longer supported by Chrome. The getcurrentposition() and watchposition() are deprecated on insecure origins in Chrome 50.
In jQuery Ajax, you can post the data separately. But when you needs to send the entire form data, it is very difficult to get all the form data individually and put together in data settings of Ajax. The jQuery .serialize() method makes this process easier.
To track the user online status, you need to maintain a flag in the database. You should need to update this flag when user will log out by the Logout link. If the user closes the browser without clicking the logout button, the browser close event detection would require for updating the flag in the database.