You need to determine the user name within the submit callback, not at the time of installing the callback.
You are passing an empty value, not using Javascript variable username
at all.
Use "/check?username=" + username
, or more correctly "/check?username=" + encodeURIComponent(username)
(in case user name contains special characters), or maybe "/check", {username: username}
(leaving the encoding to jQuery).