fix prof and reg

checking for the existence of a login (in db), as well, if not empty