fixed relation issues, addedd password encryption