                 if docs.length == 0
                     res.send 400 # Change to render a proper page TODO
                 else
-                    if param._id? and docs[0].registered is true and param.name != docs[0].name
+                    if param._id? and docs[0].registered is true
                         Db.get 'user', param._id, (user) =>
                             if !user?
                                 res.send 400 # Change to render a proper page TODO
-                            else
+                            else if user.name isnt docs[0].name
                                 if !user.friends?
                                     user.friends = []
                                 else

            res.send 400

    deleteFriend : (req, res, next) =>
        console.log "delete friend"

exports.User    = new _User
exports.Routes  =

                                user.friends.push {_id : docs[0]._id, name : param.name}
                                Db.update 'user', user._id, user, () =>
                                    res.send 200 # Change to render a proper page TODO
                            else
                                res.send 400
                    else
                        res.send 400 # Change to render a proper page TODO
        else
