Use AES to encrypt password and store encrypted information in the server. Secret key won't be stored in the server.