Fix AjaxAuthenticationSuccessHandler to better handle url generation (generates app_dev.php when necessary)