Fix bug: changing password logic. Close issue #124