Adding login page and handle login functionality.