manag register page and login page redirection