       #{if @password then 'password: ' + @password else 'and whatever password you already set'}
 
       You still need to complete your registration.
-      Please sign in at: http://nodeknockout.com/login?email=#{@email}&password=#{@password} to do so.
+      Please sign in at: http://nodeknockout.com/login?email=#{escapeURL @email}&password=#{@password} to do so.
 
 
       Thanks!


_.extend Person, {
  login: (credentials, fn) ->
    @first { email: /^#{credentials.email}$/i }, (error, person) ->
      return fn ['Unknown email'] unless person?
      return fn ['Invalid password'] unless person.passwordHash is md5 credentials.password
      person.token = Math.uuid()

  hash = crypto.createHash 'md5'
  hash.update str
  hash.digest 'hex'

validEmail = (email) ->
  /^[a-zA-Z0-9+._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test email

escapeURL = require('querystring').escape

class Team
  build: (options) ->
