logout function fixed
register:fill the username with email && first time user login redriection