Update email verification api and added user updating
Fix authenication bugs and add logout