fixed broken redirection when coming from sign_in_path or sign_up_path
fixed broken test