What do you mean it doesn't work?
Are you doing it correctly?
When you join the server for the first time you are required to use /register [Password] (Password). Sunstitute password for the one you want to have.
After doing this, you are required to login using the password you set. As brunyman said, this is in place for an extra layer of protection; you or we don't want other people using your account without permission if they manage to get on 😉
Sometimes, when someone joins presumably for the first time it asks them to login rather than register. This could be because the player had played on the server before but forgot or for other reasons.
If this is the case for you (or anyone else possibly reading this), then you can make a password reset here where your password will be reset and you can re-register. Make sure to follow the template.