Updated authentication function in app.js so that passwords are automatically converted to md5.

Also in postgresql users table, updated each password to their md5 versions.