When posting code please use the Code Tags. You have a habit of using the Quote tags instead. The Code tags are just to the right of the Quote tags.
I did a bit of fixing up of your code, and this should work properly.
on *:text:!login & &:?: {
if ($($+(%,password.,$2),2) == $2) {
set $+(%,loggedin.,$nick) yes
notice $nick You logged in successfully!
}
else { notice $nick Wrong password. }
}
on *:text:!password & &:?: {
if ($($+(%,loggedin.,$nick),2) == yes) {
set $+(%,passw0rd.,$2) $3
notice $nick Password for $2 changed to $3 $+ .
}
else { notice $nick You are not logged in. Please log in. Don't have an account? You dont have access. }
}
Most likely one question that will occur to you is "what happened to the *?"
I'll answer that now, I replaced them with & which is another wildcard character, but & only matches one word, as * will match any number of words (including none)
If you have any other questions, ask and I'll do my best to explain.