Javascript attempts for login