replace redirect with render to fix url lose issue