Need to display login page with error message rather then error page for Action token Expired

Hi,

User gets an link in email to reset the password. I have implemented a custom token\tokenhandler for the reset password.

If the link containing the action token is expired, error page is displayed with Action expired message. Could you please point me how can I customize this code to redirect the user to login page. I do have the encoded parameters sent in the same link as query parameters which are required to form the redirect uri.

I need to know if I can customize loginactionservice java code so that I can redirect user to login page in handletoken method where the token validation happens.

Please let me know if you have any thoughts on this.

Thanks.