Fix barcode login where username != barcode

With the new API-based authentication, we need to pass barcode as
barcode or username as username. Passing a barcode as a username
will not work.

Do the detection based on regex (matching opac.barcode_regex) to
determine if we are passing a barcode or a username, and identify it
as such.

Previous to this, barcode-based logins would only work if the
barcode was also/still the username.

Signed-off-by: Jeff Godin <jgodin@tadl.org>