Implemented dynamic check of registration username

Other small fixes included