register user and fixed _target_path bugs for login form