I have been playing arround for a day and didn't manage to achieve what I want. Is it possible to enqueue a script if user fails (username or password) to login? I checked and played arround with wp_login_failed but no luck so far!
I want to use this function in a popup login form. After login (success or failure) the page refreshes so I want to force pop up show automatically after a failure (user should not manually click the login button again) by adding javascript ( $('#login-dialog').show(); )