I use ajax to pass a username and password to mongodb to check if a user exists . I hash my passwords and a user has the format of :
I send the password and usern