added login page and redirect logic