Separate login code to separate HTML and Javascript files