Its possible already, you'll need
1, AJAX object to make requests
2. A server running a server side script like in PHP or asp.net
3. And a SQL database.
There are other ways, eg on Android you can use the GooglePlay login and make them sign in, and use the googleid as the identification, that way you won't need to worry much about security