Plugin: Fix failed login redirect and error msg