added changepassword and fix register validation