Modified the login page and function