fixed auth bug after registration and registration bug with bad login