What is the best way to login a user:
1) Get first the hash of the password with javascript, send it to the server and then compare it with the hash stored in the database.
2) Send the password in plain text to the server, get the hash and then compare it with the hash stored in the database.