Reworked forget password popup redirect function.

Signed-off-by: Dom Pascal <dom@dompascal.com>