You need braces here since you're performing more than 1 command in the if statement. You can only leave them out if only 1 command is being executed.

Code:
on *:TEXT:login *:?:{ 
  if ($2 == %bot.pass.login) [color:red]{[/color]
    set %logged.in.nick $nick
    .msg $nick LOGIN CONFIRMED
  [color:red]}[/color]
  else .msg $nick PASSWORD IS INCORRECT!
}