Keep logged user after register.
Fix
fixing some errors.