The request is very broad, and requires a range of skills that you may or may not be familiar with, I don't think that just "please help me out" could lead to anything meaningful.
There are a few things though that should be valid regardless of how you plan your game:
- Having an online database is definitely possible, but you should have an extra layer in the middle to mediate your requests to the database. Connecting directly to mysql (or anything similar) is never a good idea for security reasons. This is usually in the form of a web API (an interface to your data) based on PHP or other web frameworks. Your game will then perform HTTP requests to your API (like login, listing user information etc...) using async HTTP functions and events to get the data back.
- The login part is probably critical and if you are not somewhat experience in backend web development. Depending on the scale of the project it may be a good idea to look at frameworks like Laravel, CakePHP or even ruby on rails. Just plain PHP works too but it's easy to screw up on this part in terms of security, if that's relevant to you. You will need something in any case to manage the pure website part, so learning how to use a web framework and doing things consistent from the start is probably worth it.
- Check this (old!) post out to get a basic idea of how everything works together:
http://gmc.yoyogames.com/index.php?showtopic=618624&hl=+alice++bob#entry4548625 . i'm no aware of tutorials specific for this kind of integration, but probably you can look for online high score examples to get started, since more or less should follow the same principles