login page completed with error checking