Maybe return with the html code for the login page again?
or if you don't need an error message displayed then
AResponse.Content :=
'<html><head><title>Redirection</title>' +
'<meta http-equiv="refresh" content="0; url=' + 'URL where I wanna redirect' +'">' +
'</head><body>Please wait...</body></html>';
or something similar
PS: Start new threads for new questions so this thread will not be a project development and hiccup history