Unable to show error message using wp_login action
Main problem with your code is that you use wp_login action. The wp_login action hook is triggered when a user logs in by the wp_signon() function. It is the very last action taken in the function, immediately following the wp_set_auth_cookie() call. So first of all – the user is already authenticated and his auth cookie … Read more