Improve login page and sum calculation