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.

ref: tadl/ilscatcher2@db1dd7108ddd266d7f80182503a4775cffc3d581

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